I noticed that a further mcs51 peephole rule reduces the size again by 2 bytes and also increase the speed.
Defect can be closed. Does not occur in 4.6.0 anymore. Attached patch further reduces the size to 24 bytes by removing an IMO superfluous reload of A. Regards, Ruud
Improved register tracking for mcs51
CDB file format WIKI page corrupt
Just an observation: When compiling with --i-code-in-asm the i-code reveals that the order of r3 r4 is different for iTemp2 and iTemp13. This looks odd to me. Any idea why that is different? ; test.c:12: CmdBytes -= 1; // <-- bug ; [--2345--] ic:13: iTemp2 [k7 lr11:12 so:0]{ ia0 a2p0 re1 rm0 nos0 ru0 dp0}{int fixed}{ sir@ _EpdCmd_CmdBytes_10000_3}[**r3 r4** ] = iTemp13 [k21 lr9:11 so:0]{ ia0 a2p0 re0 rm0 nos0 ru0 dp0}{int fixed}[**r4 r3** ] - 0x1 {const-int literal} mov a,r4 add a,#0xff mov r3,a...
It was clear to me that it is not used, as the compiler would have complained in case it was ;-)
Dwarf inlined subroutine tag is wrong
Typo in SDCCsymt.h