delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/04/27/08:34:32

Message-ID: <3EABC30B.40106@bigpond.com>
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: 62
Date: Sun, 27 Apr 2003 21:46:19 +1000
NNTP-Posting-Host: 144.134.89.7
X-Trace: newsfeeds.bigpond.com 1051443355 144.134.89.7 (Sun, 27 Apr 2003 21:35:55 EST)
NNTP-Posting-Date: Sun, 27 Apr 2003 21:35:55 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

Richard Dawe wrote:

 > Hello.
 >
 > Ben Peddell wrote:
 >> [snip]
 >>
 >> 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"'
 >
 >
 > After rummaging around a bit more:
 >
 > It's possible that 3.2.1 was broken. There were some ABI regressions
 > in 3.2.1 that were fixed in 3.2.2:
 >
 > http://gcc.gnu.org/gcc-3.2/changes.html#3.2.2

This does not mention DJGPP.
Linux is mentioned. However, it returns the same as DJGPP - structures 
in memory (with gcc 3.2).

 >
 > PR/9506 is the one:
 >
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=9506
 >
 > gcc defaults to using -fpcc-struct-return, but what does it actually
 > use for 2.95.2 and 3.2.2?
 >
 > I've just looked at the gcc 2.95.2 sources and it looks like
 > -fpcc-struct-return (i.e.: use memory) is the default there.
 >
 > The gcc 3.2.2 source seems to default to using registers. See the end
 > gcc/config/i386/djgpp.h:
 >
 > /* Don't default to pcc-struct-return, because gcc is the only
 > compiler,
 >    and we want to retain compatibility with older gcc versions.  */
 > #define DEFAULT_PCC_STRUCT_RETURN 0

I wonder where they got that from?
Did they accidentally put that in the wrong target? What systems default 
to structures in registers? Watch for ABI bugs of this sort in them.

GCC 3.2 still had structures in memory, and it is supposed to have had 
an ABI change from the previous GCCs.

 > Why is this defined? I couldn't see a ChangeLog entry for djgpp.h.
 > AFAICT this breaks backwards compatibility, i.e.: the opposite of 
what > the comment says.
 > Is there something I'm missing?
 >
 > Thanks, bye, Rich =]
 >

- Raw text -


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