Menu

#3547 SDCC generates invalid opcode "ex de, hl" for sm83

closed-fixed
GBZ80
5
2023-02-05
2023-02-05
bbbbbr
No

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.

1 Attachments

Related

Wiki: NGI0-Entrust-SDCC

Discussion

  • Philipp Klaus Krause

    Thanks. I can reproduce the issue in sdcc from current trunk on My Debian GNU/Linux testing system.

     
  • Philipp Klaus Krause

    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
     
  • Philipp Klaus Krause

    Fixed in [r13854].

     

    Related

    Commit: [r13854]

    • bbbbbr

      bbbbbr - 2023-02-05

      Thanks for the fix and quick turnaround!

       

Log in to post a comment.

MongoDB Logo MongoDB