Skip to content

Commit 598ebe2

Browse files
authored
Merge pull request #239 from sysprog21/fix-arm-logic-not
Fix logical NOT operator crash in Arm codegen
2 parents 695e616 + c9dee0e commit 598ebe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arm-codegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void emit_ph2_ir(ph2_ir_t *ph2_ir)
419419
emit(__eor_r(__AL, rd, rn, rm));
420420
return;
421421
case OP_log_not:
422-
emit(__teq(rn));
422+
emit(__cmp_i(__AL, rn, 0));
423423
emit(__mov_i(__NE, rd, 0));
424424
emit(__mov_i(__EQ, rd, 1));
425425
return;

0 commit comments

Comments
 (0)