From: Kamil Iskra <kiskra@ernie.icslab.agh.edu.pl>
To: Jim Wilson <wilson@cygnus.com>
Cc: Richard Henderson <rth@cygnus.com>,
Greg McGary <gkm@eng.ascend.com>, Jeffrey A Law <law@cygnus.com>,
egcs@cygnus.com
Subject: Re: STRICT_ALIGNMENT is too strict for m68k
Date: Tue, 19 May 1998 08:03:00 -0000 [thread overview]
Message-ID: <Pine.GSO.3.95.980519135823.556A-100000@ernie> (raw)
In-Reply-To: <199805181828.LAA05048@rtl.cygnus.com>
On Mon, 18 May 1998, Jim Wilson wrote:
> Seems to me that there should be a separate macro for controling
> the alignment of members in structures, leaving STRICT_ALIGNMENT
> for indicating if unaligned accesses to memory will trap.
> Actually, there is already a second macro in use by expmed.c/expr.c called
> SLOW_UNALIGNED_ACCESS, which defaults to STRICT_ALIGNMENT. He could perhaps
> make m68k.h define this macro, and modify other places if necessary to
> use SLOW_UNALIGNED_ACCESS instead of STRICT_ALIGNMENT. That would avoid
> the ABI issue without creating a new macro.
According to tm.texi:
@item SLOW_UNALIGNED_ACCESS
Define this macro to be the value 1 if unaligned accesses have a cost
many times greater than aligned accesses, for example if they are
emulated in a trap handler.
Please, let's not repeat the STRICT_ALIGNMENT problem by modifying
functionality of yet another simple macro in a confusing way.
IMHO, there is little use for SLOW_UNALIGNED_ACCESS, the way it is
currently defined, since:
1. with -m68000, unaligned access will simply crash.
2. with -m68020, unaligned access will not crash and will not be emulated
by a trap handler: it will merely run slightly slower.
The macro that SHOULD apply in this case is STRICT_ALIGNMENT. As pointed
out by the Cygnus people (thanks for the testcase, Jim: I observed the
BLKmode <-> ?Imode differences, but I wasn't aware of their consequences),
it can't be used, since (contrary to the way it is currently documented)
it is ABI unsafe.
Therefore, I think that what we need is a new macro, like
USE_STRICT_ALIGNMENT_ABI or sth, that, when defined and non-zero simulates
the ABI changes imposed by STRICT_ALIGNMENT (mode, alignment, register
arguments), but does not force unaligned accesses to be made scattered
into byte-accesses.
If done carefully, this would allow us to alter m68k.h in ABI-compatible
manner.
Does this sound OK for you guys? I am willing to contribute the necessary
changes.
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets GCC maintainer UNIX system administrator |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /
next prev parent reply other threads:[~1998-05-19 8:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-14 15:38 Greg McGary
1998-05-14 22:14 ` Rask Ingemann Lambertsen
1998-05-15 12:05 ` Jim Wilson
1998-05-15 14:35 ` Greg McGary
1998-05-16 19:47 ` Richard Henderson
1998-05-18 12:09 ` Jim Wilson
1998-05-19 8:03 ` Kamil Iskra [this message]
1998-05-19 20:24 ` Jim Wilson
1998-05-18 11:32 ` Jim Wilson
1998-05-18 23:58 ` Jeffrey A Law
1998-05-16 19:47 ` Kamil Iskra
1998-05-16 22:35 ` Richard Henderson
1998-05-17 10:51 ` Kamil Iskra
1998-05-17 18:05 ` Jeffrey A Law
1998-05-18 6:02 ` Andreas Schwab
1998-05-18 23:58 ` Jim Wilson
1998-05-20 2:27 ` Andreas Schwab
1998-05-19 21:17 ` Rask Ingemann Lambertsen
1998-05-18 12:09 ` 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=Pine.GSO.3.95.980519135823.556A-100000@ernie \
--to=kiskra@ernie.icslab.agh.edu.pl \
--cc=egcs@cygnus.com \
--cc=gkm@eng.ascend.com \
--cc=law@cygnus.com \
--cc=rth@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).