Skip to content

Commit

Permalink
Fix discrepancy in chibicc ND_NOT codegen (jart#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Dec 30, 2020
1 parent 79ff43a commit 2831689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/chibicc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ void gen_expr(Node *node) {
gen_expr(node->lhs);
cmp_zero(node->lhs->ty);
emitlin("\tsete\t%al");
emitlin("\tmovzbl\t%al,%rax");
emitlin("\tmovzbq\t%al,%rax");
return;
case ND_BITNOT:
gen_expr(node->lhs);
Expand Down

0 comments on commit 2831689

Please sign in to comment.