SDCC : z80/sm83/mos6502 4.2.2 #13350 (Linux)
(I'm not able to check against a newer SDCC version at the moment since my Linux system lacks a compatible glibc and I haven't had a chance to compile a newer one from source.)
One of our users reported the following problem. I've simplified their code to a somewhat minimal example.
Compiling the included sample code fails and generates an invalid instruction (ex de, hl) for sm83 twice.
Snippet of some output:
...
push af
inc sp
ex de, hl
inc hl
inc hl
inc hl
...
It fails with these errors:
main.asm:369: Error: <o> .org in REL area or directive / mnemonic error
main.asm:396: Error: <o> .org in REL area or directive / mnemonic error
Compiled with:
sdcc -msm83 --no-std-crt0 --use-stdout -c main.c -o main.o
Using --no-peep does not remove the error.
Thanks. I can reproduce the issue in sdcc from current trunk on My Debian GNU/Linux testing system.
Fixed in [r13854].
Related
Commit: [r13854]
Thanks for the fix and quick turnaround!