Regression in mos6502 ZP allocation for 4.5.0
By the way, could we also add the bug-6502.c file (renamed to bug-3831.c) to sdcc/support/regression/tests ? This would make it part of the test suite, and prevent the bug from re-appearing in the future.
Thank you for addressing this so quickly! I can confirm the fix in r15263 resolves all the problems I've observed in the BB Studio builds Our GBDK-2020 cross-platform tests all run fine too. As does the NES port of the GB "Black Castle". So looks like everything's good to go for a GBDK upgrade.
Regression for 6502 in SDCC 4.5.0
Fix SDAS incbin search path
Seems it was actually fixed in 14650. So this ticket can be closed. There still seems to be a problem with case 3 generating a 16-bit sequence that seems redundant to me, given that the two input variables and the function parameter are all 8-bit. But that's not a functional bug - just a possible optimization, assuming the compiler can predict this.
Case 3 in the above (the actual failing case) was a bit incorrect/badly formatted, but I can't edit the ticket. It should say: Whereas case 3 generates a very long sequence of instructions, where the value of the "lda y" gets immediately overwritten by a "ldx #0x00 / txa" pair: 295 ; src/x_and_not_y.c: 62: print_hex(XANDNOTY_MACRO()); 00C5A4 AD 01 03 [ 4] 296 lda _y 00C5A7 A2 00 [ 2] 297 ldx #0x00 00C5A9 8A [ 2] 298 txa 00C5AA 49 FF [ 2] 299 eor #0xff 00C5AC 85 2F [ 3] 300 sta (_main_sloc0_1_0 +...
Patch to make missing .lst file during .rst file creation cause a warning instead of error