]> git.gag.com Git - fw/sdcc/commitdiff
fixed bug #1076940
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 2 Dec 2004 08:08:42 +0000 (08:08 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 2 Dec 2004 08:08:42 +0000 (08:08 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3594 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/peeph.def

index 1e44366c20c7f75dd96424cf29843fe492465ee6..eae66f0a00f35203722891c1229e3a2e890d9dfc 100644 (file)
@@ -1082,15 +1082,20 @@ replace {
 
 // applies to f.e. bug-408972.c
 // not before peephole 177.c
-replace restart {
-       mov     %1,%2
-       mov     %3,%4
-       mov     %2,%1
-} by {
-       ;       Peephole 177.d  removed redundant move
-       mov     %1,%2
-       mov     %3,%4
-} if notVolatile %1 %2
+// Bug #1076940, this rule erroneously applies to:
+//     mov     a,r2
+//     mov     acc.0,c
+//     mov     r2,a
+//
+//replace restart {
+//     mov     %1,%2
+//     mov     %3,%4
+//     mov     %2,%1
+//} by {
+//     ;       Peephole 177.d  removed redundant move
+//     mov     %1,%2
+//     mov     %3,%4
+//} if notVolatile %1 %2
 
 // applies to f.e. bug-607243.c
 // also check notVolatile %3, as it will return FALSE if it's @r%1