??? 01/08/07 17:56 Read: times |
#130443 - I don't think so, I'm afraid Responding to: ???'s previous message |
Attila Strba said:
The mentioned code piece is time critical Unfortunately, I think this is a fundamental problem! Time-critical, by its very nature, tends to be non-portable. 'C' gives you absolutely no guarantees at all about what specific machine code may be generated for any particular source lines. You may be able to "tune" your source code to a specific version of a specific compiler, but to get this to work across different compilers is quite unlikely, I think. ... I have to be SURE that the C compiled code has the same efficienty as the assembler one. You can never be sure of that - see above. The best you can do is to inspect the generated code, which largely defeats the object - you probably might as well have written it in assembler in the first place! because SDCC assembler does not support macros, defines I want to have all the source code in C. I think you're just going to have to re-write your assembler into a "least common subset" of the 2 assemblers. And don't forget: the two compilers may well have different internal data representations, different calling conventions, etc, etc... |