System V: RDI destination, RSI left, RDX right. Unsigned addition returns
zero and stores the sum, or one on overflow without touching destination.
No pointer or counter is truncated to a signed immediate. The carry branch
must precede the store: recovery and frame versions cannot wrap into reuse.
12def nativeCheckedWordAddAssembly : (family X86NativeAssembly) =
13 (constructor
14 X86NativeAssembly
15 X86NativeAssemblyEmit
16 (constructor
17 X86NativeInstruction
18 X86NativeAddRegister64
19 (constructor X86NativeRegister64 X86NativeRDX)
20 (constructor X86NativeRegister64 X86NativeRSI))
21 (constructor
22 X86NativeAssembly
23 X86NativeAssemblyJumpCondition
24 (constructor X86NativeCondition X86NativeConditionBelow)
25 b"overflow"
26 (constructor
27 X86NativeAssembly
28 X86NativeAssemblyEmit
29 (constructor
30 X86NativeInstruction
31 X86NativeStoreMemory64
32 (constructor X86NativeRegister64 X86NativeRDI)
33 (x86NativeDisplacement32FromNatural 0)
34 (constructor X86NativeRegister64 X86NativeRSI))
35 (constructor
36 X86NativeAssembly
37 X86NativeAssemblyEmit
38 (constructor
39 X86NativeInstruction
40 X86NativeClear32
41 (constructor X86NativeRegister64 X86NativeRAX))
42 (constructor
43 X86NativeAssembly
44 X86NativeAssemblyEmit
45 (constructor X86NativeInstruction X86NativeReturn)
46 (constructor
47 X86NativeAssembly
48 X86NativeAssemblyLabel
49 b"overflow"
50 (constructor
51 X86NativeAssembly
52 X86NativeAssemblyEmit
53 (constructor
54 X86NativeInstruction
55 X86NativeMoveImmediate32
56 (constructor X86NativeRegister64 X86NativeRAX)
57 (x86NativeImmediate32FromNatural 1))
58 (constructor
59 X86NativeAssembly
60 X86NativeAssemblyEmit
61 (constructor X86NativeInstruction X86NativeReturn)
62 (constructor X86NativeAssembly X86NativeAssemblyEnd)))))))))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.