From 5e004c9f67d0a1d4a401015358cb12e1d3d3668f Mon Sep 17 00:00:00 2001 From: frief Date: Thu, 2 Dec 2004 08:08:42 +0000 Subject: [PATCH] fixed bug #1076940 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3594 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/mcs51/peeph.def | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/mcs51/peeph.def b/src/mcs51/peeph.def index 1e44366c..eae66f0a 100644 --- a/src/mcs51/peeph.def +++ b/src/mcs51/peeph.def @@ -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 -- 2.47.2