CW10 - Switch Statement code generation, V1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CW10 - Switch Statement code generation, V1

ソリューションへジャンプ
851件の閲覧回数
WHookway
Contributor III

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

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
384件の閲覧回数
WHookway
Contributor III

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
385件の閲覧回数
WHookway
Contributor III

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

0 件の賞賛
返信