aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/float-to-uint32.qbe2
-rw-r--r--test/float-to-uint64.qbe14
-rw-r--r--test/uint32-to-float.qbe5
-rw-r--r--test/uint64-to-float.qbe16
4 files changed, 7 insertions, 30 deletions
diff --git a/test/float-to-uint32.qbe b/test/float-to-uint32.qbe
index 2cfc65f..a06c5fd 100644
--- a/test/float-to-uint32.qbe
+++ b/test/float-to-uint32.qbe
@@ -3,6 +3,6 @@ function w $f() {
@start.1
@body.2
%.1 =s call $g()
- %.2 =l stosi %.1
+ %.2 =w stoui %.1
ret %.2
}
diff --git a/test/float-to-uint64.qbe b/test/float-to-uint64.qbe
index 363fc30..2055abd 100644
--- a/test/float-to-uint64.qbe
+++ b/test/float-to-uint64.qbe
@@ -3,16 +3,6 @@ function l $f() {
@start.1
@body.2
%.1 =s call $g()
- %.2 =w cges %.1, s_9.2233720368547758e+18
- jnz %.2, @ftou_big.5, @ftou_small.4
-@ftou_small.4
- %.3 =l stosi %.1
- jmp @ftou_join.3
-@ftou_big.5
- %.4 =s sub %.1, s_9.2233720368547758e+18
- %.5 =l stosi %.4
- %.6 =l xor %.5, 9223372036854775808
-@ftou_join.3
- %.7 =l phi @ftou_small.4 %.3, @ftou_big.5 %.6
- ret %.7
+ %.2 =l stoui %.1
+ ret %.2
}
diff --git a/test/uint32-to-float.qbe b/test/uint32-to-float.qbe
index 0e90531..75c2e1e 100644
--- a/test/uint32-to-float.qbe
+++ b/test/uint32-to-float.qbe
@@ -3,7 +3,6 @@ function s $f() {
@start.1
@body.2
%.1 =w call $g()
- %.2 =l extuw %.1
- %.3 =s sltof %.2
- ret %.3
+ %.2 =s uwtof %.1
+ ret %.2
}
diff --git a/test/uint64-to-float.qbe b/test/uint64-to-float.qbe
index 4c3cf92..8e14a8a 100644
--- a/test/uint64-to-float.qbe
+++ b/test/uint64-to-float.qbe
@@ -3,18 +3,6 @@ function s $f() {
@start.1
@body.2
%.1 =l call $g()
- %.2 =w csltl %.1, 0
- jnz %.2, @utof_big.5, @utof_small.4
-@utof_small.4
- %.3 =s sltof %.1
- jmp @utof_join.3
-@utof_big.5
- %.4 =l and %.1, 1
- %.5 =l shr %.1, 1
- %.6 =l or %.5, %.4
- %.7 =s sltof %.6
- %.8 =s add %.7, %.7
-@utof_join.3
- %.9 =s phi @utof_small.4 %.3, @utof_big.5 %.8
- ret %.9
+ %.2 =s ultof %.1
+ ret %.2
}