X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fz80%2Fpeeph.def;h=365e5531f59afbbf262457e11cec9a12e4ba6214;hb=283ec58c3d36f26d72f5098f8e189eee66ef670f;hp=a866d187b1063c0e27d2afac7f4f08e0ff271dab;hpb=ac0ba2632946bc2d86ca75797b3c8634c4806626;p=fw%2Fsdcc diff --git a/src/z80/peeph.def b/src/z80/peeph.def index a866d187..365e5531 100644 --- a/src/z80/peeph.def +++ b/src/z80/peeph.def @@ -1,69 +1,7 @@ -replace restart { - ld (hl),(hl) -} by { - ERROR - peephole - caught (hl),(hl) -} -replace restart { - ld %1,%1 -} by { - ; Removed redundent load -} -replace restart { - xor a,a - or a,%1 - or a,a - jp %2,%3 -} by { - ; Removed redundent or a,a - xor a,a - or a,%1 - jp %2,%3 -} -replace restart { - cp a,#0x00 - jp nz,%1 -} by { - ; Rule 3 - or a,a - jp nz,%1 -} -replace restart { - jp nz,%1 - jp %2 -%1: - jp %3 -%2: -} by { - ; Rule 4 - jp z,%2 -%1: - jp %3 -%2: -} -replace restart { - jp nz,%1 - jp %2 -%1: -} by { - ; Rule 5 - jp z,%2 -%1: -} -replace restart { - jp z,%1 - jp %2 -%1: -} by { - ; Rule 6 - jp nz,%2 -%1: -} -replace restart { - ld a,%1 - or a,%2 - or a,a -} by { - ; Rule 8 - ld a,%1 - or a,%2 -} +// peeph.def - Common Z80 and gbz80 peephole rules + +// This file should contain common Z80/GBZ80 peepholes. +// However the GBZ80 port is currently unmaintained; +// a GBZ80 expert could extract peepholes that are useful for both Z80 and GBZ80 +// from peeph-z80.def and peeph-gbz80.def and move them here. +