delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/17/11:05:53

From: buers AT gmx DOT de (Dieter Buerssner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inefficiency of GCC output code & -O problem
Date: 17 Apr 2000 15:06:03 GMT
Lines: 22
Message-ID: <8dfekp.3vvqu6v.0@buerssner-17104.user.cis.dfn.de>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000417163323 DOT 17688D-100000 AT is>
NNTP-Posting-Host: pec-114-113.tnt7.s2.uunet.de (149.225.114.113)
Mime-Version: 1.0
X-Trace: fu-berlin.de 955983963 8039265 149.225.114.113 (16 [17104])
X-Posting-Agent: Hamster/1.3.13.0
User-Agent: Xnews/03.02.04
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

>On Mon, 17 Apr 2000, Alexei A. Frounze wrote:
>
>> Also Watcom C/C++ has one very feature. It can generate code for
>> register and stack based calling conventions. I.e. parameters may be
>> passed either via stack or via registers. It also helps greatly.
>
>GCC has such a feature as well.  Read the on-line GCC manual about the 
>"-mregparm" switch, for details.

Certainly, gcc has such a feature. But it is (almost) unusable.
When you call the library, the program will stop working. Recompiling
the library won't help, because of the asm code.

Other compilers circumvent the library problem by __cdecl or
equivalent keywords in the header files. (This will not avoid
all problems, though. It is almost, but not totally transparent
to the code, because of function pointers.) 

-- 
Regards, Dieter

- Raw text -


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