[gnu.gcc.bug] gcc on 386 sysv

andy@icom.icom.com (02/12/90)

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)