Skip to content

Commit d228a87

Browse files
committed
Don't emit underscore constant when compiling for P2, fixes #481
1 parent 2166a5a commit d228a87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backends/asm/outasm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6651,6 +6651,10 @@ CompileConstant(IRList *irl, AST *ast, bool skip_clkfreq, bool skip_clkmode)
66516651
}
66526652
expr = (AST *)sym->v.ptr;
66536653
if (!expr) return;
6654+
if (gl_p2 && !strcasecmp(name,"_")) {
6655+
// This causes assembly to break, so just omit it
6656+
return;
6657+
}
66546658
if (skip_clkfreq && !strcasecmp(name, "_clkfreq")) {
66556659
return;
66566660
}

0 commit comments

Comments
 (0)