diff options
author | Michael Forney <mforney@mforney.org> | 2019-07-03 00:16:16 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-07-03 02:40:53 -0700 |
commit | d875bf74986b87378f80d7be4cd08e8eb8e91c65 (patch) | |
tree | 605f5b0b3339a9f9c049d63cb796f2d44f48ef15 /test/varargs.qbe | |
parent | 94ff44d9f3df0ce081bd66c5ebebee660608342b (diff) |
Convert controlling expression of loops to bool
Diffstat (limited to 'test/varargs.qbe')
-rw-r--r-- | test/varargs.qbe | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/varargs.qbe b/test/varargs.qbe index 2a760d6..cb3542a 100644 --- a/test/varargs.qbe +++ b/test/varargs.qbe @@ -8,14 +8,15 @@ function $f(w %.1, ...) { vastart %.3 @while_cond.3 %.4 =w loadsw %.2 - jnz %.4, @while_body.4, @while_join.5 + %.5 =w cnew %.4, 0 + jnz %.5, @while_body.4, @while_join.5 @while_body.4 - %.5 =w vaarg %.3 - %.6 =s vaarg %.3 - %.7 =l vaarg %.3 - %.8 =w loadsw %.2 - %.9 =w sub %.8, 1 - storew %.9, %.2 + %.6 =w vaarg %.3 + %.7 =s vaarg %.3 + %.8 =l vaarg %.3 + %.9 =w loadsw %.2 + %.10 =w sub %.9, 1 + storew %.10, %.2 jmp @while_cond.3 @while_join.5 ret |