diff options
Diffstat (limited to 'test/subtract-pointer.qbe')
-rw-r--r-- | test/subtract-pointer.qbe | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/subtract-pointer.qbe b/test/subtract-pointer.qbe new file mode 100644 index 0000000..0e7e9a3 --- /dev/null +++ b/test/subtract-pointer.qbe @@ -0,0 +1,16 @@ +export +function $f(l %.1, l %.3) { +@start.1 + %.2 =l alloc8 8 + storel %.1, %.2 + %.4 =l alloc8 8 + storel %.3, %.4 +@body.2 + %.5 =l loadl %.2 + %.6 =l copy %.5 + %.7 =l loadl %.4 + %.8 =l copy %.7 + %.9 =l sub %.6, %.8 + %.10 =l div %.9, 4 + ret +} |