On Mon, 2 Oct 2017 13:46:12 +0200
Philipp Klaus Krause <p...@spth.de> wrote:

> Dear users of the z80 backend,
> 
> I intend to remove some z80 peephole rules. You might want to check if
> you are affected (by compiling your source usign current SDCC 3.6.9
> #10025 or later with --fverbose-asm, and checking the output, e.g. using
> a command like "grep peephole 21c test.asm".
> 
> While peephole rules are a quick way to get a bit of optimization, often
> improvements in code generation and register allocation can result in
> even better code (and also make old peephole rules obsolete).
> 
> None of these rules is currently used in the regression tests for z80.
> 
> Keeping unused and untested rules comes with a maintainance burden and a
> risk for bugs, so rules that are no longer used should be removed once
> in a while.
> 
> If one of the rules that I want to remove happens to be used by SDCC
> when compiling your code, please report on the list, and I well keep it.
> Ideally, you would also provide a small some compileable source example
> that SDCC uses the rule for.
> 
> Here is the list of rules to be removed:  

Fuzix uses 49g, 141a.

49f and 49f' are I assumne different ?

49g turns up in powf() in the C library severa times, and in soem device
drivers


141a turns up in driver code for the kernel in a few places (eg
sd_spi_init for socz80)

       ld      c, #0x14
;       genLabel
00131$:
;../dev/devsd_discard.c:93: sd_spi_receive_byte(); /* send dummy clocks
       -- at le ;       genCall
        push    bc
        call    _sd_spi_receive_byte
        pop     bc
;../dev/devsd_discard.c:92: for (n = 20; n; n--)
;       genMinus
;       genIfx
        dec c
; peephole 141a removed redundant transfer and flag setting in a
        jr      NZ,00131$

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to