Forum : Other families
Original Post
Post Information | Post |
---|---|
June 4, 2021 - 10:28am
|
GCC C816 sometimes generates inefficient code. When there is such C code:
then, the compiler may generate following ASM code:
The compiler will generate ASM code that seems to ignore that all fields of the structure exist in the Page0 region. |
Hello,
Thanks for the information.
Indeed the C816 compiler could be more efficient if one day we have resources for that.
However, there might we ways to workaround the problem...
Please first confirm the version of the compiler that you are using and the optimization options.
Note also that there might be ways to write the same thing differently and get a better result. Which CPU are you using? Do you have NVM data in your CPU?
Best Regards,
Vincent