* src/hc08/gen.c (hc08_emitDebuggerSymbol),
[fw/sdcc] / src / z80 / peeph-gbz80.def
index 36ee9c577276eabc2369c11ee368f7b300fc65b2..cccda960d297a6b39555d53133627e7b64e5a33b 100644 (file)
@@ -1,37 +1,73 @@
-replace restart {
+replace {
+       ld      (hl),a
+        dec     hl
+} by {
+        ld      (hl-),a
+}
+replace {
        ld      (hl),a
        inc     hl
 } by {
        ld      (hl+),a
 }
-replace restart {
+replace {
        ld      a,(hl)
        inc     hl
 } by {
        ld      a,(hl+)
 }
-replace restart {
+replace {
        ld      a,[hl]
        inc     hl
 } by {
        ld      a,[hl+]
 }
-replace restart {
+replace {
        ld      a,[hl]
        inc     hl
 } by {
        ld      a,[hl+]
 }
-replace restart {
+replace {
        ld      [hl],a
        inc     hl
 } by {
        ld      [hl+],a
 }
-replace restart {
+replace {
        ld      [hl],a
        dec     hl
 } by {
        ld      [hl-],a
 }
-
+replace {
+       ld      (hl+),a
+       ld      (hl),d
+       dec     hl
+       ld      e,(hl)
+       inc     hl
+       ld      d,(hl)
+       ld      a,(de)
+} by {
+       ld      (hl+),a
+       ld      (hl),d
+       ld      e,a
+       ld      a,(de)
+}
+replace {
+       ld      (hl),a
+       ld      %1,(hl)
+} by {
+        ld      (hl),a
+        ld      %1,a
+}
+replace {
+       ld      (hl),a
+       inc     de
+       ld      a,(de)
+       inc     hl
+} by {
+       ld      (hl+),a
+       inc     de
+       ld      a,(de)
+}
\ No newline at end of file