We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear all
I would like to avoid generation on "_ARM_common_switch8" in switch case / MDK ARM.
I cannot change the source code because of its porting past product.
it may be difficult to use compiler optimization without impact other part.
Could you let me know any good way to solve ?
Any information much appreciated.
Best regards
someone wrote
When you use more than 7 switch-cases, compile would call this library function-'ARM_COMMON_SWITCH8' to help compute the address that program would switch to.
There are two known methods to solve this problem. One is dividing your switch structure into several smaller 'condition structure' such as 'if and else' and switch structure with less than 6 cases. The second method is using optimization options such as '-O1,-O2,-O3,-Os'.
Hello.
Thank you for your comment.
I know the information from an thread and I tried but it didn't solve.
I want to delete it without modifying the source code as possible, because of specific reason.
Best Regards