* configure,
[fw/sdcc] / src / mcs51 / peeph.def
index 6327c8b5a7f2e91977f993af6bc308d563e2e39d..e0aed8b39b97174867b308a546b1476aa1295a64 100644 (file)
@@ -684,7 +684,7 @@ replace {
        mov     a,%2
        add     a,#0xff - %1
        mov     %3,c
-}
+} if operandsLiteral(%1)
 
 replace {
        clr     c
@@ -696,7 +696,7 @@ replace {
        mov     a,%2
        add     a,#0xff - %1
        jnc     %5
-}
+} if operandsLiteral(%1)
 
 replace {
        clr     c
@@ -708,7 +708,7 @@ replace {
        mov     a,%2
        add     a,#0xff - %1
        jc      %5
-}
+} if operandsLiteral(%1)
 
 replace {
        clr     c
@@ -720,7 +720,7 @@ replace {
        mov     a,#0x100 - %2
        add     a,%1
        mov     %3,c
-} if operandsNotRelated('0x00' %2)
+} if operandsNotRelated('0x00' %2), operandsLiteral(%2)
 
 replace {
        clr     c
@@ -732,7 +732,7 @@ replace {
        mov     a,#0x100 - %2
        add     a,%1
        jc      %5
-} if operandsNotRelated('0x00' %2)
+} if operandsNotRelated('0x00' %2), operandsLiteral(%2)
 
 replace {
        clr     c
@@ -744,7 +744,7 @@ replace {
        mov     a,#0x100 - %2
        add     a,%1
        jnc     %5
-} if operandsNotRelated('0x00' %2)
+} if operandsNotRelated('0x00' %2), operandsLiteral(%2)
 
 
 replace {
@@ -1536,20 +1536,21 @@ replace {
        inc     dptr
 }
 
-// char indexed access to: char code table[] = {4,3,2,1};
-replace {
-       add     a,#%1
-       mov     dpl,a
-       clr     a
-       addc    a,#(%1 >> 8)
-       mov     dph,a
-       clr     a
-       movc    a,@a+dptr
-} by {
-       ;       Peephole 186.d  optimized movc sequence
-       mov     dptr,#%1
-       movc    a,@a+dptr
-}
+// disabled due to bug #1434401
+//// char indexed access to: char code table[] = {4,3,2,1};
+//replace {
+//     add     a,#%1
+//     mov     dpl,a
+//     clr     a
+//     addc    a,#(%1 >> 8)
+//     mov     dph,a
+//     clr     a
+//     movc    a,@a+dptr
+//} by {
+//     ;       Peephole 186.d  optimized movc sequence
+//     mov     dptr,#%1
+//     movc    a,@a+dptr
+//}
 
 // char indexed access to: int code table[] = {4,3,2,1};
 replace {