X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fmcs51%2Fpeeph.def;h=168866f13b164f8370f7ef32050ccaa33025813b;hb=41ff3b55f586efb58903dd992714556f7ab07151;hp=146a39f02d6189364d00fa0e545f81d0ff81c273;hpb=643b7d1a43dce67e766bb9d87a5549c66d07d5f7;p=fw%2Fsdcc diff --git a/src/mcs51/peeph.def b/src/mcs51/peeph.def index 146a39f0..168866f1 100644 --- a/src/mcs51/peeph.def +++ b/src/mcs51/peeph.def @@ -1483,15 +1483,15 @@ replace { mov %1,a } if notVolatile %1 -replace { -// acc being incremented might cause problems - mov %1,a - inc %1 -} by { - ; Peephole 185 changed order of increment (acc incremented also!) - inc a - mov %1,a -} if notVolatile %1 +//replace { +// acc being incremented might cause problems with register tracking +// mov %1,a +// inc %1 +//} by { +// ; Peephole 185 changed order of increment (acc incremented also!) +// inc a +// mov %1,a +//} if notVolatile %1 // char indexed access to: long code table[] = {4,3,2,1}; replace restart { @@ -1690,15 +1690,26 @@ replace { ; Peephole 191 removed redundant mov } if notVolatile %1 +// applies to f.e. regression/ports/mcs51/support.c replace { mov r%1,a mov @r%2,ar%1 } by { mov r%1,a - ; Peephole 192 used a instead of ar%1 as source + ; Peephole 192.a used a instead of ar%1 as source mov @r%2,a } +// applies to f.e. printf_large.c +replace { + mov ar%1,@r%2 + mov a,r%1 +} by { + ; Peephole 192.b used a instead of ar%1 as destination + mov a,@r%2 + mov r%1,a +} + replace { jnz %3 mov a,%4