Minor peephole improvement
authorspth <spth@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 29 Dec 2008 23:22:21 +0000 (23:22 +0000)
committerspth <spth@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 29 Dec 2008 23:22:21 +0000 (23:22 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5309 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/z80/peeph-z80.def

index 7aba32e9e40fba457531e05cfd5df8dff5c662d9..e1da4128a6ea827f1302a9db235c348f1fb7ca00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-29 Philipp Klaus Krause <pkk AT spth.de>
+
+       * src/z80/peeph-z80.def:
+         Minor peephole improvement.
+
 2008-12-29 Raphael Neider <rneider AT web.de>
 
        * src/pic/pcode.c (insertBankSel, FixRegisterBanking): emit
index 706c6eadc488001c56801d01b0919a5d94a69ffe..ba83efff4dbc3e3fc7ac1c14559d66fa027cc948 100644 (file)
@@ -95,6 +95,20 @@ replace restart {
        inc     hl
 } if notUsed('bc')
 
+// Catch double and triple incs before later peepholes introduce an ex de,hl in here.
+replace restart {
+       inc     de
+       inc     de
+       ld      l,e
+       ld      h,d
+} by {
+       ld      l,e
+       ld      h,d
+       ; peephole 0h' incremented in hl instead of de.
+       inc     hl
+       inc     hl
+} if notUsed('de')
+
 replace restart {
        inc     de
        ld      l,e