2008-02-16 Borut Razem <borut.razem AT siol.net>
- *
+ * as/z80/asmain.c, as/z80/asm.h, as/z80/asdata.c,
+ as/link/z80/lkmain.c, as/z80/as_gbz80.dsp, as/z80/as_z80.dsp,
+ as/z80/Makefile.in. as/z80/Makefile.bcc:
+ applied patch #1893393: patch for as-z80 and link-z80 to generate
+ cdb, thanks to Armin Diehl
+ * as/*/asnoice.c, as/hc08/as_hc08.dsp, as/hc08/Makefile.in,
+ as/mcs51/asx8051.dsp, as/mcs51/Makefile.in:
+ asnoice.c moved to as/asxxsrc/asnoice.c
+ * src/z80/peeph-gbz80.def: applied patch
+ #1880235: Z80 return peephole, thanks to Philipp Krause
2008-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
jp %1,%5
} by {
ret %1
- ; peephole z12 replaced jump by return.
+ ; peephole z11a replaced jump by return.
} if labelIsReturnOnly(), labelRefCountChange(%5 -1)
// Should be one of the last ones. Opens the code to further peephole optimization.
replace restart {
%1:
} by {
- ; peephole z13 removed unused label %1.
+ ; peephole z12 removed unused label %1.
} if labelRefCount(%1 0)
+// Applying z11 or z11a followed by z12 will often leave a dead ret at the end of the function. Remove it.
+replace {
+ jp %5
+ ret
+} by {
+ jp %5
+ ; peephole z13 removed unused ret.
+}
+
// These should be the last rules, so that the peepholes above need to look at jp only.
replace {
jp %5
} by {
jr %5
- ; peephole z14 changed absolute to relative conditional jump.
+ ; peephole z14 changed absolute to relative unconditional jump.
} if labelInRange()
replace {