make distclean error
"Works as expected" means the registers are setup according to the ABI. i.e. first 8-bit param in A, second in X. The compiler follows this behavior even for inlined function. This works perfectly if the variables are used in the C code. The optimizer removes the parameters because it detects them as not used in the function. the (void)x; quiets the warning but the compiler still knows the variable is unused and optimizes it out.
uCsim support for 65c816
HuC6280 assembler support
implemented in [r16811]
Initial sdas support for Huc6280.
I gave it another look. I think it's possible to solve it at the icode level. I was able to identify the sequence and I know what need to be done but I am unable to correct it.
prevent invalid --data-loc values for MOS6502