Integer add with carry instructions.

Integer addition with carry in/out/both.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-23 13:32:26 -07:00
parent acf41a7c09
commit b1bd3140db
7 changed files with 103 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
test cat
test verifier
function add_i96(i32, i32, i32, i32, i32, i32) -> i32, i32, i32 {
ebb1(v1: i32, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32):
v10, v11 = iadd_cout v1, v4
;check: $v10, $v11 = iadd_cout $v1, $v4
v20, v21 = iadd_carry v2, v5, v11
; check: $v20, $v21 = iadd_carry $v2, $v5, $v11
v30 = iadd_cin v3, v6, v21
; check: $v30 = iadd_cin $v3, $v6, $v21
return v10, v20, v30
}