From: Stefan Katzenbeisser <e9625414@student.tuwien.ac.at>
To: axp-list@redhat.com
Subject: Re: problem with unaligned access on Alpha
Date: Tue, 22 Jun 1999 14:32:39 +0200 (METDST) [thread overview]
Message-ID: <Pine.HPX.4.10.9906221414520.10341-100000@stud3.tuwien.ac.at> (raw)
In-Reply-To: <41256798.003CACD0.00@saturn.aladdin.de>
On Tue, 22 Jun 1999, Christian Groessler wrote:
> I think it's a compiler bug.
It is, see below.
> I would expect the "val=READ_WORD()" line to generate an unaligned access
> exception,
> but this doesn't happen. Instead, only one _byte_ at address xadr is read,
> resulting
> in val=0xcc. Val is 0xcccc on intel machines.
I encountered a similar problem some weeks ago; it's the way egcs
generates load-instructions for bytes and shorts: your code results in
ldq_u $1,0($2)
extwl $1,$2,$1
This can't work if the adress is not aligned (ldq_u loads the quadword
statring at $2 with the low three bits cleared...).
That's definitively a compiler bug. I solved the problem by upgrading
to egcs 1.1.2
Best,
Stefan.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
| Stefan Katzenbeisser
| e-mail: skatzenbeisser@acm.org
| http://stud3.tuwien.ac.at/~e9625414
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Public PGP key available on my homepage or upon request.
next prev parent reply other threads:[~1999-06-22 13:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-22 10:59 problem with unaligned access on Alpha Christian Groessler
1999-06-22 12:32 ` Stefan Katzenbeisser [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-06-23 10:23 Christian Groessler
1999-06-23 14:55 ` Maciej W. Rozycki
1999-06-23 14:56 ` Michal Jaegermann
1999-06-23 16:23 ` Maciej W. Rozycki
1999-06-24 7:02 ` Michal Jaegermann
1999-06-25 20:21 ` Maciej W. Rozycki
1999-06-24 8:29 Christian Groessler
1999-06-24 15:26 ` Michal Jaegermann
1999-06-24 8:54 Christian Groessler
1999-06-29 9:12 Wessels, Hans
1999-06-29 15:07 ` Michal Jaegermann
1999-07-05 17:23 ` Maciej W. Rozycki
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox