08-02-2026, 03:27 AM
@Napomex,
here is some files updated (the same way as the one before, with some more stuff)
https://drive.google.com/file/d/1DcLjQvw...sp=sharing
My approach: check code, extract from loops what can be extracted, avoid mul/div (especially in loops), put computation next to where they are used (if computation becomes useless because of break/continue/return), as I said above.
+ generate asm and check what looks too heavy for what it should do, try to modify/simplify the c code and recheck the new asm to keep the best c version.
You can compare the c file in the archive in the link of this message with yours and compare the asm generated for both versions (and maybe ask Claude what it thinks about it).
to generate asm:
cc900 -S -O3 xenon.c
Tell me if you think that what I have done may be useful to you or not...
here is some files updated (the same way as the one before, with some more stuff)
https://drive.google.com/file/d/1DcLjQvw...sp=sharing
My approach: check code, extract from loops what can be extracted, avoid mul/div (especially in loops), put computation next to where they are used (if computation becomes useless because of break/continue/return), as I said above.
+ generate asm and check what looks too heavy for what it should do, try to modify/simplify the c code and recheck the new asm to keep the best c version.
You can compare the c file in the archive in the link of this message with yours and compare the asm generated for both versions (and maybe ask Claude what it thinks about it).
to generate asm:
cc900 -S -O3 xenon.c
Tell me if you think that what I have done may be useful to you or not...

