??? 11/05/08 07:48 Read: times |
#159698 - Keil and reasoning Responding to: ???'s previous message |
Sorry, Andy, I overlooked this one.
Andy Neil said:
With Keil, to use inline assembler, the compiler just generates an assembler source as its output. You then have to pass that through the assembler to generate an Object file. I think this is what all compilers (except the new HiTech OCG perhaps) do, don't they? So this is not Keil's special. Andy Neil said:
This means you lose all your 'C' source symbol information. I don't see, why. I will experiment at home if time permits, but I see no reason why would the compilation (i.e. translation from C to asm) hide symbols such as global variables and other function's names. There are certainly preprocessor issues, that's certainly true. However, even if all of this would be true, the same holds if you place the asm part into a separate file, isn't it? So it's no better not worse to do it inline (as a function of course, that's my assertion from the very beginning). Andy Neil said:
It may mean that you can't use (certain) optimisations. Well, I would go for the pain to do a part of the program in asm IN ORDER to hand-optimise a critical part, so I don't care about what optimisations the compiler could come up with. Andy Neil said:
It can also mess-up the build system's dependencies. I don't know what is this, pardon me. Andy Neil said:
It's probably also responsible for Global Warming and the current Credit Crisis... Contrary. Hand-optimised code consumes less resources - we trade the energy spent by programmer for the energy spent on manufacturing more memory, more electricity - all this converts directly to money, so if this spares money, it certainly decreases Global Warning, too. I am too weak in economics to comment on the relationship to the current Credit Crisis, so you might be right on that one. IANAKE (I Am Not A Keil Expert) JW |