Mail Archives: djgpp/2000/04/15/14:15:17
Dieter Buerssner wrote:
>
> Alexei A. Frounze wrote:
>
> >I'm going to change that stupid "g" constraint. I'll replace it with
> >others ("r" and "m" or even with particular registers, if needed).
>
> I hope you are aware, that you cannot just change "g" to "m", that
> wouldn't work. You have to get rid of all those stupid references
> as well.
I didn't put any "m"s, just replaced "g" with "r" or a particular register name.
Btw, does GCC support both natations of register names as parameters to inline
assembly like this:
: "a"(), "b"(), "c"(), "d"(), "S"(), "D"()
and
: "eax"(), "ebx"(), "ecx"(), "edx"(), "esi"(), "edi"()
Seems it compiles both. Right?
> \begin{rant}
> I still think, it is stupid, that gcc made this non back compatible
> change with the clobbered input registers.
...
> \end{rant}
Sure. I have a 3d engine written for older version of GCC. And it doesn't
compile now because of the clobbered register list.
I.e. if a parameter is passed to the inline assembly block defineteyl via EAX
register:
: "a" (variable), ...
and the same register (EAX) is in the clobbered list, GCC stops with a error
message. Don't remember what exactly it says, but it's a very bad behaviour.
Newer versions should definetely have support for old syntax.
> Probably I shouldn't tell you Alexei, but if you wouldn't have
> used all those unnecessary references, "g" would even have worked
> with floating point variables.
But what I'd do then? I'd need inline asm anyway, so I might give up with GCC or
finally switch to external assembly functions instead of any inlining.
thanks.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
- Raw text -