🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2869

gcc on 386 sysv

#2869
From: andy
Date: Sun, 11 Feb 1990 21:45
34 lines
1696 bytes
Hello,

I have noticed that the GNU C compiler does not round addresses the
same as the stock ATT C compiler that comes with System V for the 386.
All of this applies to systems using tm-att386.h.

Specifically, when a static variable is being defined the
ASM_OUTPUT_LOCAL macro uses the SIZE argument rather than ROUNDED.
While this is correct behavior (as compared to ATT) for
ASM_OUTPUT_COMMON it is not correct for ASM_OUTPUT_LOCAL.

I would change the ASM_OUTPUT_LOCAL macro in tm-att386.h to use the
ROUNDED value rather than SIZE.

In a similar vein, ATT rounds string constants.  This is not a problem
unless you use -fwritable-strings.  It might be nice if
ASM_OUTPUT_ASCII rounded strings iff. -fwritable-strings was given on
the command line.

If there is a particular (good) reason why this was done this way, I'd
like to hear it.  Otherwise, I'm definitely going to make both these
changes to my copy (I have a lot of old code that needs writable
strings), and it would be nice to have at least the ASM_OUTPUT_LOCAL
macro changed.

Of course, none of this is a problem on the 386.  Like the Vax it can
read non-aligned data.  But programs will run faster (at the expense
of memory space) if you make these changes.

		Thanks,

		Andrew H. Marrinson
		Icom Systems, Inc.
		(andy@icom.icom.com)
Technical Details
Message-ID: <9002112145.AA00512@xwkg.icom.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!icom.icom.com!andy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!icom.icom.com!andy
From: andy@icom.icom.com
Newsgroups: gnu.gcc.bug
Subject: gcc on 386 sysv
Message-ID: <9002112145.AA00512@xwkg.icom.com>
Date: 11 Feb 90 21:45:15 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34