34cf0c8b63
I compiled tests/plat/lib/test.c with ack -mcpm, but i80 ncg did emit wrong code in writehex(uint32_t) for "0123456789abcdef"[code & 0xf] The code called '.and' to evaluate `code & 0xf`, then tried to call '.cii' to narrow the result from 4 to 2 bytes, but it passed garbage instead of 4 to '.cii'. The rule for '.and' was pat and defined($1) kills ALL uses dereg={const2,$1} gen Call {label,".and"} This failed to kill register de={const2,4}, so ncg pushed de, expecting to push 4, but actually pushing garbage. Fix such rules using `mvi a,...` or `lxi de,...` so ncg doesn't track the token in the register. This is like the i86 table. A different fix would use a dummy instruction `killreg a` or `killreg de` like the m68020 table. Also correct 1 to $1 when calling '.exg'. |
||
---|---|---|
.. | ||
as | ||
dl | ||
libem | ||
libend | ||
libmon | ||
ncg | ||
top | ||
Action | ||
mach_params |