diff options
Diffstat (limited to 'tests/uint64-to-float.qbe')
-rw-r--r-- | tests/uint64-to-float.qbe | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/uint64-to-float.qbe b/tests/uint64-to-float.qbe new file mode 100644 index 0000000..6542c29 --- /dev/null +++ b/tests/uint64-to-float.qbe @@ -0,0 +1,20 @@ +export +function s $f() { +@start.1 +@body.2 + %.1 =l call $g() + %.2 =w csltl %.1, 0 + jnz %.2, @utof_big.4, @utof_small.3 +@utof_small.3 + %.3 =s sltof %.1 + jmp @utof_join.5 +@utof_big.4 + %.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.5 + %.9 =s phi @utof_small.3 %.3, @utof_big.4 %.8 + ret %.9 +} |