Small-C
Small-C copied to clipboard
Commutes bug
In CC4.C function peep(), the test for commutes is wrong. Results in no commutes optimizations being applied, or possibly mis-applied. Should be ‘*(cp=code[*next])’, like in isfree(). Also, in CC1.C, some expressions for slast, etc. are 2x too large due to neglecting pointer arithmetic. Can help to use HSTBPW (‘#define HSTBPW sizeof(int)’ in CC.H) instead of BPW when defining int array sizes and boundaries. Do you need corrected CC.H, CC1.C, and CC4.C examples from me, or is this enough info?