#1827 z80 register spill kills code

closed-fixed
z80 port (188)
5
2011-08-26
2011-08-24
No

[makefile included, but...]
sdcc3 -mz80 --nostdinc -I../include --nooverlay --nogcse --nolabelopt --noinvariant --noinduction --nojtbound --noloopreverse --no-reg-params --no-peep -DUNBUFFERED_IO=1 -c cf_bug20110823.c

SDCC : z80/r2k/pic16/pic14/hc08 3.0.4 #6751 (Aug 23 2011) (CYGWIN)

You may want/need to "#define printnum(X) printf( "%d", (X) )"
Email: ljmorris-sf at softwareconceptsinc.net

Incorrect code is generated for the Z80 port.

sf_page_size is set to 0x0108 before the call to "cf_rdblk",
but the value passed in to cf_rdblk is not 0x0108.

In the generated code, the iy register does not get loaded
with the value in the word sf_page_size before being pushed
onto the stack.

Discussion

  • Lee Morrison

    Lee Morrison - 2011-08-24

    Source files and makefile

     
    Attachments
  • Philipp Klaus Krause

    • labels: --> z80 port
    • assigned_to: nobody --> spth
    • status: open --> closed-fixed
     
  • Philipp Klaus Krause

    Fixed in sdcc revision #6759.

    Philipp

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks