public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: mrs@wrs.com (Mike Stump)
To: wilson@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: m68k structure packing
Date: Tue, 30 Sep 1997 16:58:00 -0000	[thread overview]
Message-ID: <199709302357.QAA07269@kankakee.wrs.com> (raw)

> Date: Tue, 30 Sep 1997 14:55:51 -0700
> From: Jim Wilson <wilson@cygnus.com>

> With this patch, gcc will pack structures regardless of what
> STRUCTURE_SIZE_BOUNDARY is set to, but will now in some cases
> silently generate code that fails at run time.

I would be interested in any such cases that you know of.  This cannot
happen on the arm, if we are to believe the arm coff or netbsd ports
for the arm, as they reset STRUCTURE_SIZE_BOUNDARY to 8.  This cannot
happen on the sh, if we are to believe the sh ports, as
STRUCTURE_SIZE_BOUNDARY defaults to 8.  Only with -mpadstruct option
does the value change.  elxsi doesn't count because it was copied
wholesale from the VAX, and I suspect at the time, vax had it as 32,
also it doesn't count because I don't think a machine is left in the
world that can run.  dsp16xx, fx80, mn10200, pyr, spur, tahoe and
we32k I cannot comment on, other than to say I think we32k is dead.

That leaves m68k.  On the m68k the compiler did seem to go out of it's
way to generate correct code.  Further, Kamil has claimed that the
amiga m68k port works fine with STRUCTURE_SIZE_BOUNDARY as 8.

Why do you think generated code will fail?  Because of unaligned reads
and writes?  I see many popular machines, and ones that I know have
been tested well, that define STRICT_ALIGNMENT and have
STRUCTURE_SIZE_BOUNDARY set to 8.  Maybe if you describe that case I
can hunt for it.

If one goes back though the old ChangeLogs, one sees that many ports
used to have values other than 8, but over time, they were changed to
8.

I think that in the absence a bug that can be reproduced, and since it
has been accepted by the FSF for inclusion in the next FSF gcc
release, that it be included in egcs.

If people that have access to m68000 (not a 030 or a 020) could try
out -fpack-struct (with -O, without -O) with my changes, and try and
make it fail, that would be a big help in ensuring that no bug is
introduced.  It is probably imporant that the code run on a m68k that
requires alignment (if I understand Jim's concerns).

             reply	other threads:[~1997-09-30 16:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-30 16:58 Mike Stump [this message]
1997-09-30 18:20 ` Jim Wilson
1997-10-01  9:02   ` Peter Barada
  -- strict thread matches above, loose matches on Subject: below --
1997-10-01 15:08 Mike Stump
1997-10-01 15:56 ` Peter Barada
1997-10-01 16:16   ` Per Bothner
1997-10-02 20:14     ` Jim Wilson
1997-10-02  6:49   ` Paul Koning
1997-10-02 20:09   ` Jim Wilson
1997-10-02 20:01 ` Jim Wilson
1997-10-02 21:40   ` Richard Henderson
1997-10-01 12:16 Mike Stump
1997-10-01 12:39 ` Joel Sherrill
1997-10-02 18:37 ` Jim Wilson
1997-09-30 21:42 Jim Wilson
1997-10-01  5:44 ` Kamil Iskra
1997-09-30 20:16 Mike Stump
1997-09-30 22:03 ` Jeffrey A Law
1997-09-30 13:32 Mike Stump
1997-09-30 14:56 ` Jim Wilson
1997-09-30 12:08 Mike Stump
1997-09-30 12:57 ` Charles M. Hannum
1997-09-30 19:58 ` Jim Wilson
1997-09-30 21:13   ` Richard Henderson
1997-09-30 21:22   ` Jim Wilson
1997-10-01 15:14 ` Jim Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199709302357.QAA07269@kankakee.wrs.com \
    --to=mrs@wrs.com \
    --cc=egcs@cygnus.com \
    --cc=wilson@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).