|
|
@ -2,7 +2,7 @@ test run |
|
|
|
target aarch64 |
|
|
|
|
|
|
|
; i128 tests |
|
|
|
; TODO: It would be nice if we had native support for i128 immediates in CLIF's parser |
|
|
|
; TODO: Cleanup these tests when we have native support for i128 immediates in CLIF's parser |
|
|
|
function %i128_const_0() -> i64, i64 { |
|
|
|
block0: |
|
|
|
v1 = iconst.i128 0 |
|
|
@ -37,3 +37,20 @@ block0(v0: i64,v1: i64,v2: i64,v3: i64): |
|
|
|
; run: %add_i128(1, 0, 1, 0) == [2, 0] |
|
|
|
; run: %add_i128(1, 0, -1, -1) == [0, 0] |
|
|
|
; run: %add_i128(-1, 0, 1, 0) == [0, 1] |
|
|
|
|
|
|
|
|
|
|
|
function %sub_i128(i64, i64, i64, i64) -> i64, i64 { |
|
|
|
block0(v0: i64,v1: i64,v2: i64,v3: i64): |
|
|
|
v4 = iconcat v0, v1 |
|
|
|
v5 = iconcat v2, v3 |
|
|
|
|
|
|
|
v6 = isub v4, v5 |
|
|
|
|
|
|
|
v7, v8 = isplit v6 |
|
|
|
return v7, v8 |
|
|
|
} |
|
|
|
; run: %sub_i128(0, 0, 0, 0) == [0, 0] |
|
|
|
; run: %sub_i128(1, 0, 1, 0) == [0, 0] |
|
|
|
; run: %sub_i128(1, 0, 0, 0) == [1, 0] |
|
|
|
; run: %sub_i128(0, 0, 1, 0) == [-1, -1] |
|
|
|
; run: %sub_i128(0, 0, -1, -1) == [1, 0] |