From: spth Date: Mon, 29 Dec 2008 23:22:21 +0000 (+0000) Subject: Minor peephole improvement X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c566e0b75f7d5740a348b777dc051cf74907aeef;p=fw%2Fsdcc Minor peephole improvement git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5309 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 7aba32e9..e1da4128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-29 Philipp Klaus Krause + + * src/z80/peeph-z80.def: + Minor peephole improvement. + 2008-12-29 Raphael Neider * src/pic/pcode.c (insertBankSel, FixRegisterBanking): emit diff --git a/src/z80/peeph-z80.def b/src/z80/peeph-z80.def index 706c6ead..ba83efff 100644 --- a/src/z80/peeph-z80.def +++ b/src/z80/peeph-z80.def @@ -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