delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/04/27/04:06:43

From: Ben Peddell <killer DOT lightspeed AT bigpond DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bug 00314 -- div() still broken
References: <3e9c6920$0$21928$afc38c87@> <fA9pa.20115$1s1 DOT 299825 AT newsfeeds DOT bigpond DOT com> <3EA5477F DOT 2020901 AT cyberoptics DOT com> <SzSpa.21592$1s1 DOT 332473 AT newsfeeds DOT bigpond DOT com> <3ea85d95$0$12489$4c41069e AT reader1 DOT ash DOT ops DOT us DOT uu DOT net> <Ah9qa.22112$1s1 DOT 343387 AT newsfeeds DOT bigpond DOT com> <3ea97d4c$0$19415$4c41069e AT reader1 DOT ash DOT ops DOT us DOT uu DOT net>
Lines: 29
Message-ID: <lzLqa.23283$1s1.356122@newsfeeds.bigpond.com>
Date: Sun, 27 Apr 2003 15:41:14 +1000
NNTP-Posting-Host: 144.139.175.52
X-Trace: newsfeeds.bigpond.com 1051428177 144.139.175.52 (Sun, 27 Apr 2003 17:22:57 EST)
NNTP-Posting-Date: Sun, 27 Apr 2003 17:22:57 EST
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eric Rudd wrote:
> Ben Peddell wrote:
> 
>> Obviously, some sort of optimization puts the div_t structure in 
>> %edx:%eax instead of 16(%ebp). It would be a good optimization if it 
>> didn't break the libraries. 
> 
> 
> Yes, indeed.  So, it looks as if there is a gcc bug here.  Where are the 
> calling conventions documented?  I couldn't find them in the gcc.ixx 
> docs.  I think I ought to isolate this and submit a bug report, if gcc 
> is indeed at fault.  I suppose a workaround would be to recompile libc, 
> but then one wonders whether all the other libraries are also broken.
> 
> -Eric Rudd
> rudd AT cyberoptics DOT com
> 

OK. GCC 3.2.1 has -fpcc-struct-return by default in DJGPP, whilst GCC 
3.2.2 has -freg-struct-return by default in DJGPP.
GCC 3.2.2 may need to be configured to make -fpcc-struct-return the 
default, to maintain compatibility with the DJGPP 2.03 libraries. Or, 
the libraries may need to be re-compiled for GCC 3.2.2, and marked as such.

These options are in `info gcc "Invoking GCC" "Code Gen Options"'




- Raw text -


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