Fuzix-Compiler-Kit
Fuzix-Compiler-Kit copied to clipboard
op16_on_node() in be-code-6800.c does not set array addresses correctly.
Problems encountered in test/tests/0601-register.c test on MC6800 CPU.
int test_cast(void)
{
static int buf;
register char *p = (char *)&buf;
*(int *)p = 0x1234;
return buf;
}
When this function is compiled, the following object is generated.
_test_cast:
des
des
ldaa #<T6+0
ldab #<T6+1
This should be the upper and lower bytes of #T6.
_test_cast:
des
des
ldaa #T6/256
ldab #T6%256
This problem occurs at op16_on_node() in be-code-6800.c , but I can't think of any ideas to fix it.