??? 03/03/09 13:51 Read: times |
#163018 - A compiler should support ALL MCU features ... Responding to: ???'s previous message |
... but few of them do.
That's because the authors seldom know, particularly in advance of their development, what the MCU's features are. Many of them have on-chip XRAM, but it's enabled/disabled in different ways. How many of them support the use of both data pointers on MCU's that have them? How many support the MAC in the some of the SiLabs parts? How many support the use (read/write) of internal FLASH? You always have to whittle your own ways of doing such things. It's pretty easy to do all those things in ASM. Once you've figured out how to do it in ASM, perhaps 'C' will allow you to do it, too, but, after all, it's going to take 10x as much effort, and will be 10x as large, and 10x as slow ... and may even prune out the things you have to do to make it work ... <sigh> ... so you take the compiler output and modify it so it's not so inefficient or ineffective. If you can't get it to work in ASM ... well, you probably can't get it to work at all. That's why there's inline ASM in many compilers. RE |