* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / src / pic / peeph.def
index f705c9e53c4a817938147afd83cd11e597761e5d..8e6df14f6100431cd5e0c267ad197babd481eff0 100644 (file)
@@ -164,7 +164,7 @@ replace restart {
 replace restart {
        decf    %1,f
        movf    %1,w
-       btfss   _STATUS,z
+       btfss   STATUS,z
        goto    %2
 } by {
        ;     peep 3 - decf/mov/skpz to decfsz
@@ -291,3 +291,41 @@ replace restart {
         ;     peep 12 - Removed redundant move
         comf    %1,f
 }
+
+replace restart {
+       clrf    %1
+       rlf     %1,f
+       movlw   0x01
+       xorwf   %1,f
+       movf    %1,w
+       btfss   STATUS,2
+       goto    %2
+
+} by {
+        ;     peep 13 - Optimized carry sequence
+       clrf    %1
+       incf    %1,F
+       btfss   status,C
+       goto    %2
+       clrf    %1
+       
+}
+
+replace restart {
+       clrf    %1
+       rlf     %1,f
+       movlw   0x01
+       xorwf   %1,f
+       movf    %1,w
+       btfsc   STATUS,2
+       goto    %2
+
+} by {
+        ;     peep 13a - Optimized carry sequence
+       clrf    %1
+       incf    %1,F
+       btfsc   status,C
+       goto    %2
+       clrf    %1
+       
+}