Mail Archives: djgpp/2000/04/27/06:37:09
On 26 Apr 00, at 15:25, Alexei A. Frounze wrote:
> To make things a bit clear... I've always used the "g" thing for passing
> parameters to inline assembly blocks. Now AFAIK it's wrong. "g" may be used for
> eax, ebx, ecx, edx or variable in memory.
Or esi, ebx, ebp, or an imediate constant.
> Then some of people appearing in the NG said me that my inline assembly code
> makes all the problems and that is not a bug in the compiler. I still doubt that
> GCC has a good behaviour here. It must either compile normally my inline
> assembly w/o depending on the optimization switches or fail with the same error
> messages again w/o regard of those switches.
This is IHMO a valid point. It would be nice, if GCC could
"understand" inline assembly. Then it could warn you. Like it is, GCC
doesn't really try to understand the assembly code, it just treats it
in a formal way. I can't imagine that this will change soon/ever.
> What we have now:
> - fixed inline assembly
> - yet another pretty efficient optimizing compiler :)
> - faster 3d engine
> - some real experience we all can learn from
- hopefully the insight, that inline assembly is not that easy and
needs the careful reading of the documentation.
- don't use inline assembly for everything
- your wise conclusion ;)
- Raw text -