Hi,
I have a large switch statement and the generated code is using stack space (80 bytes), I cannot afford this, most of my threads call this routine. I have organized the case values to be contiguous with no improvement, I do not know why the code is not a simple jump table at this point. I noticed that others have posted this issue with previous versions of the compiler (CW8.1) and there was a pragma called switch_tables that allowed for control of how the case statement was implemented. Is there a way to force the code generation of the switch statement?
Thanks,
Will
Solved! Go to Solution.
Hi,
I appologize, I did not dig into this far enough. The switch statement is building the table and the stack usage is due to another question that I will post, removing the switch statement had removed the stack usage.
Regards,
Will
Hi,
I appologize, I did not dig into this far enough. The switch statement is building the table and the stack usage is due to another question that I will post, removing the switch statement had removed the stack usage.
Regards,
Will