Skip to content

Commit fb718ae

Browse files
committed
Merge pull request golang#4 from 4ad/checknil-non-reg
cmd/gc: support checknil on non-reg operands on arm64
2 parents 10a6891 + 6d8f389 commit fb718ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/gc/pgen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ cgen_checknil(Node *n)
528528
dump("checknil", n);
529529
fatal("bad checknil");
530530
}
531-
if(((thechar == '5' || thechar == '9') && n->op != OREGISTER) || !n->addable || n->op == OLITERAL) {
531+
if(((thechar == '5' || thechar == '7' || thechar == '9') && n->op != OREGISTER) || !n->addable || n->op == OLITERAL) {
532532
regalloc(&reg, types[tptr], n);
533533
cgen(n, &reg);
534534
gins(ACHECKNIL, &reg, N);

0 commit comments

Comments
 (0)