I am impressed GCC for ARM looks to use genuine jump tables. This is how the code worked in an assembly listing. A branch to a jump table was made if the value passed in was between the minimum and maximum case values. This took only three instructions: sub... ;subtract minimum from value passed in cmp... ;compare result with maximum-minimun constant value ldrls pc,... ;if result is less than maximum-minimum then use result as as an index value into a table to determine where to branch to next The size of the jump table is the difference between the maximum and minimum case values + 1. The jump table contained one of two values: a location to branch to corresponding to the action to take if any of the case values was satisfied or a location to branch to if there was no case match between the minumum and maximum case values. John Heenan --- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote: > > I think you are right! It generats a 240 byte jump table! Still seem > to be overkill > > Gus
Message
Re: unexplained RAM use on GCC
2005-11-21 by John Heenan
Attachments
- No local attachments were found for this message.