commit | 8f361faffc93f89d1025d9ca729d76cd7850ad99 | [log] [tgz] |
---|---|---|
author | Jack Palevich <jackpal@google.com> | Thu Jul 30 16:19:43 2009 -0700 |
committer | Jack Palevich <jackpal@google.com> | Thu Jul 30 16:19:43 2009 -0700 |
tree | 1965a34acd50959e3adaa660d21059a97795cf37 | |
parent | 9f51a2696126c6db40d00c8183b26e89fb7e443e [diff] [blame] |
Fix bad ARM code generation for '||' and '&&' operators. Add tests of '&', '&&', '|' and '||' operators.
diff --git a/libacc/acc.cpp b/libacc/acc.cpp index 7739e2d..0bb0c5e 100644 --- a/libacc/acc.cpp +++ b/libacc/acc.cpp
@@ -4131,9 +4131,10 @@ if (a && level > 8) { a = pGen->gtst(t == OP_LOGICAL_OR, a); pGen->li(t != OP_LOGICAL_OR); - pGen->gjmp(5); /* jmp $ + 5 (sizeof li, FIXME for ARM) */ + int b = pGen->gjmp(0); pGen->gsym(a); pGen->li(t == OP_LOGICAL_OR); + pGen->gsym(b); } } }