chibicc
chibicc copied to clipboard
`asm()` argument shouldn't be `data`
Right now something like
#include <uxn.h>
void main(void) {
int n = asm("#1234");
}
compiles to
|0100
LIT2r 0000 main_ POP2r BRK
( bss )
( data )
@L.data.0_
"#1234 ( <---- oops 😅 )
( text )
@main_ ( -- result* )
OVR2r LIT2r 0002 SUB2r #1234 STH2kr STA2
#0000
&return
POP2r JMP2r
The expected behavior is not to emit @L.data.0_ "#1234.