delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/15/14:15:17

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: THE -O2 PROBLEM
Date: Sat, 15 Apr 2000 20:19:17 +0400
Organization: MTU-Intel ISP
Lines: 61
Message-ID: <38F89685.FC08D23A@mtu-net.ru>
References: <38F20E7A DOT 3330E9A4 AT mtu-net DOT ru> <38F6C64E DOT C7753C6C AT mtu-net DOT ru> <8d7l3g$j3i$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38F76B94 DOT 5E968BA7 AT mtu-net DOT ru> <8d9okd DOT 3vs7iub DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de>
NNTP-Posting-Host: ppp97-174.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 955822093 52022 212.188.97.174 (15 Apr 2000 18:08:13 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 15 Apr 2000 18:08:13 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: en,ru
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019