??? 03/16/05 16:08 Read: times |
#89779 - glue code Responding to: ???'s previous message |
a few years ago i had the same problem, with the full Keil compiler (actually Archimedes 2000, a rebrand of Keil ...) ... the memory space and processor speed had already been fixed to 32K PROM and 10 (12? 20?) MHz so upgrading the hardware was not an option. i looked at the assembly code generated by the compiler from the C code, and converted the project to assembly based on that. it seemed to me at the time that the compiler put in a lot of glue code that i could strip out (don't remember what i meant by that but maybe something like, too many unnecessary register saves). if you look carefully at the assembly it would probably be obvious. i'm guessing that the extra code was necessary for the compiler to compile; that it couldn't guess ahead of time what scenarios the engineer might come up with, and had to satisfy a wider subset to cover all possibilities. did several optimizations by hand and the project came in one or two hundred bytes short of 32K PROM and just within timing margins. james |