309def sm90EncodeBranch =
310 (lambda unrestricted guard : SM86InstructionGuard .
311 unrestricted target : SM90BranchTarget .
312 unrestricted control : SM86Control .
313 let unrestricted complement = (sm90BranchComplement target) in
314 then (sm90Require (pipe target sm90BranchBytes (nat-modulo 4) (naturalEqual 0)) SM90RefusalBranchUnaligned)
315 (sm90Require (nat-less-than complement sm90BranchModulus) SM90RefusalBranchOutOfRange)
316 (sm90Require (sm90ControlFits control) SM90RefusalControlOutOfRange)
317 (sm90Emit
318 (nest nat-add (sm90HeaderLow sm90OpcodeBranch guard)
319 (pipe complement (nat-divide 4) (nat-modulo sm90Span8) (sm90Put sm90BranchLowPlace))
320 (pipe complement (nat-divide 1024) (nat-modulo sm90BranchMiddleSpan) (sm90Put sm90BranchMiddlePlace))))
321 (nest nat-add (sm90HeaderHigh control)
322 sm90BranchFixed)
323 (nat-divide complement sm90BranchHighUnit))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.