I am in the process of porting my regular CCS environment to a new MacBook (M1) and on this new system the generated code is not exactly the same as on my current system. This is an issue for me because the code CRC is legally significant in this case.
I have two projects for generating my code, a library and a regular project, it is the library project (that I was not able to import in the new CCS) that has a slight difference in code, although CCS and compiler versions are the same and (so far I can see) all optimization settings are identical.
The code differences (at least one of the differences I was able to detect boils down to the following snippets:
Current system:
... 33a8: 12B0 33DC CALL #$abproc0 ... $abproc0(): 33dc: 403D 4B06 MOV.W #0x4b06,R13 33e0: 12B0 4552 CALL #operator << 33e4: 4130 RET
The compiler optimizes a couple of calls to the same routine with $abproc0.
On the new system the code looks like:
3338: 403D 4B38 MOV.W #0x4b38,R13 333c: 12B0 4584 CALL #operator <<
This happens a couple of times so indeed the other version saves a couple of bytes.
Does anyone have an idea what parameter/setting might incur this difference in generated code ?