From: Przemek Klosowski <przemek@rrdjazz.nist.gov>
Subject: Re: This may be a really dumb question
Date: Wed, 24 Sep 1997 12:39:10 -0400 [thread overview]
Message-ID: <199709241639.MAA18235@rrdjazz.nist.gov> (raw)
Tom Linden wrote
Most risc machines can only accept a datum on a natural boundary,
thus a 32 bit integer's address has to be evenely divisible by 4.
Correct so far...
This is not true with the Power PC, BTW The alpha design team didn't
really know what they were doing. In any event to answer your question,
its the job of the compiler to properly align things. If you get this
message then its really a compiler bug, i.e. the compiler that was used
but it is is no longer so in this paragraph. The Alpha team knew well
what they were doing. Any modern memory is organized in words (often 4
or 8 bytes, sometimes even 16 bytes), so non-aligned access is a bad
match, and, if the loaded item crosses memory word boundary, requires
two memory cycles. There are ways of handling this (caches/prefetching),
but they complicate things; that is why initial Alpha architecture
simply dropped unaligned loads (BTW, they were added in a recent
revision).
Sometimes, however, unaligned loads are necessary. In particular,
the Ethernet packets, which are delivered by hardware as a binary block,
have internal parts that aren't aligned. If one just grabs them,
one ends up with an unaligned load. Of course it is possible to copy
them byte by byte to an aligned buffer and access it there, but this
requires special-case code in the driver, which wasn't done.
In any case, the compiler doesn't figure here.
p
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next reply other threads:[~1997-09-24 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-24 16:39 Przemek Klosowski [this message]
1997-09-24 17:12 ` This may be a really dumb question Tom Linden
1997-09-28 4:23 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
1997-09-25 0:57 Uncle George
1997-09-24 5:32 Jim Paradis
1997-09-24 1:28 Jim Paradis
[not found] <Pine.LNX.3.95.970923051536.527L-100000@sheerx.eni.net>
1997-09-24 1:10 ` Tom Linden
1997-09-24 16:38 ` Volker Barthelmann
1997-09-28 3:39 ` Richard Henderson
1997-09-23 12:15 Sheer Panic
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