More fixes for DPTR use
[fw/sdcc] / src / z80 / peeph.def
index e29001de514754e985d6ad18aac44e2b04bb3b86..a00fd659c13633cb4d20a6532b012532a47ff28c 100644 (file)
@@ -96,12 +96,18 @@ replace restart {
 } by {
         xor     a,a
 }
-replace restart {
+replace {
         ld      e,#0x00
         ld      d,#0x00
 } by {
         ld      de,#0x0000
 }
+replace {
+       ld      l,#0x00
+       ld      h,#0x00
+} by {
+        ld      hl,#0x0000
+}
 replace restart {
        ld      %1,a
        ld      a,%1
@@ -119,3 +125,20 @@ replace restart {
 %2:
        jp      %4
 }
+replace {
+       ld      l,e
+       ld      h,d
+       push    hl
+       ld      l,c
+       ld      h,b
+       push    hl
+} by {
+        push   de
+        push    bc
+}
+replace {
+       and     a,#%1
+       or      a,a
+} by {
+        and     a,#%1
+}