Source/Packages

Compiler.MachineX86NativeAssembly

packages/compiler/src/Compiler/MachineX86NativeAssembly.alpha

548 lines56 declarations22.2 KiBSHA-256 4a24f06c7be3

def · lines 115–214

x86NativeLayoutAssemblyFrom

Full file
115def x86NativeLayoutAssemblyFrom :
116  (pi unrestricted assembly : (family X86NativeAssembly) .
117    (pi unrestricted offset : (family X86NativeUnsigned32) . (family X86NativeAssemblyLayoutResult))) =
118  (lambda unrestricted assembly : (family X86NativeAssembly) .
119    (eliminate
120      X86NativeAssembly
121      (lambda unrestricted value : (family X86NativeAssembly) .
122        (pi unrestricted offset : (family X86NativeUnsigned32) .
123          (family X86NativeAssemblyLayoutResult)))
124      assembly
125      (branch
126        X86NativeAssemblyEnd
127        .
128        (lambda unrestricted offset : (family X86NativeUnsigned32) .
129          (constructor
130            X86NativeAssemblyLayoutResult
131            X86NativeAssemblyLayoutSuccess
132            (constructor X86NativeLabelTable X86NativeLabelTableEmpty)
133            offset)))
134      (branch
135        X86NativeAssemblyEmit
136        instruction
137        tail
138        layoutTail
139        .
140        (lambda unrestricted offset : (family X86NativeUnsigned32) .
141          (x86NativeAdvanceLayout (x86EncodeNativeInstruction instruction) offset layoutTail)))
142      (branch
143        X86NativeAssemblyLabel
144        name
145        tail
146        layoutTail
147        .
148        (lambda unrestricted offset : (family X86NativeUnsigned32) .
149          (eliminate
150            X86NativeAssemblyLayoutResult
151            (lambda unrestricted result : (family X86NativeAssemblyLayoutResult) .
152              (family X86NativeAssemblyLayoutResult))
153            (layoutTail offset)
154            (branch
155              X86NativeAssemblyLayoutSuccess
156              labels
157              finalSize
158              .
159              (eliminate
160                X86NativeLabelLookupResult
161                (lambda unrestricted lookup : (family X86NativeLabelLookupResult) .
162                  (family X86NativeAssemblyLayoutResult))
163                (x86NativeLookupLabel name labels)
164                (branch
165                  X86NativeLabelFound
166                  existingOffset
167                  .
168                  (constructor X86NativeAssemblyLayoutResult X86NativeAssemblyDuplicateLabel name))
169                (branch
170                  X86NativeLabelMissing
171                  .
172                  (constructor
173                    X86NativeAssemblyLayoutResult
174                    X86NativeAssemblyLayoutSuccess
175                    (constructor X86NativeLabelTable X86NativeLabelTableEntry name offset labels)
176                    finalSize))))
177            (branch
178              X86NativeAssemblyDuplicateLabel
179              duplicateName
180              .
181              (constructor
182                X86NativeAssemblyLayoutResult
183                X86NativeAssemblyDuplicateLabel
184                duplicateName))
185            (branch
186              X86NativeAssemblyOffsetOverflow
187              .
188              (constructor X86NativeAssemblyLayoutResult X86NativeAssemblyOffsetOverflow)))))
189      (branch
190        X86NativeAssemblyJump
191        target
192        tail
193        layoutTail
194        .
195        (lambda unrestricted offset : (family X86NativeUnsigned32) .
196          (x86NativeAdvanceLayout (bytes 0 0 0 0 0) offset layoutTail)))
197      (branch
198        X86NativeAssemblyJumpCondition
199        condition
200        target
201        tail
202        layoutTail
203        .
204        (lambda unrestricted offset : (family X86NativeUnsigned32) .
205          (x86NativeAdvanceLayout (bytes 0 0 0 0 0 0) offset layoutTail)))
206      (branch
207        X86NativeAssemblyLoadEffectiveAddressRIPLabel
208        destination
209        target
210        tail
211        layoutTail
212        .
213        (lambda unrestricted offset : (family X86NativeUnsigned32) .
214          (x86NativeAdvanceLayout (bytes 0 0 0 0 0 0 0) offset layoutTail)))))

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.