From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: Weird Compaq CCC / GCC interaction ?
Date: Tue, 26 Sep 2000 20:17:34 -0700 [thread overview]
Message-ID: <20000926201734.A10667@twiddle.net> (raw)
In-Reply-To: <CMM.0.90.4.969989147.larry@scrugs.lkg.dec.com>
On Tue, Sep 26, 2000 at 01:25:47PM -0400, Larry Sendlosky wrote:
> MAGIC is an unsigned int (32bits) with value 0xc00fc00f. The compiler
> should generate 0x00000000c00fc00f for the register value. This is
> "sign extending" an unsigned int (there is no sign bit or it's
> "inferred" to be zero).
Incorrect. The calling conventions specify that bit 31 of a 32-bit
value should be replicated up. We choose this form because this is
what the 32-bit arithmetic and memory load instructions do, so oft
times we need perform no extra work.
Basicly, one should choose *some* canonical form for 32-bit data in
your 64-bit registers. Sign extending happens to be easiest on Alpha.
Failure to do so results in catastrophic failure in the face of missing
or incorrect prototypes -- all too common in source code even today.
Anyway, the gcc problem was brought to my attention by Steve Hobbes
from the Compaq compiler group back in January. It's been fixed since,
though I guess that's well after 2.95 was released.
r~
next prev parent reply other threads:[~2000-09-27 3:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-26 17:25 Weird Compaq CCC / GCC interaction ? Larry Sendlosky
2000-09-26 18:01 ` Michal Jaegermann
2000-09-27 3:17 ` Richard Henderson [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-09-26 18:52 Larry Sendlosky
2000-09-26 17:47 David Addison
2000-09-26 13:59 David Addison
2000-09-26 15:36 ` Ivan Kokshaysky
2000-09-26 8:55 David Addison
2000-09-26 9:41 ` Andrei A. Dergatchev
2000-09-26 10:12 ` Nikita Schmidt
2000-09-26 16:02 ` Michal Jaegermann
2000-09-26 12:23 ` Ivan Kokshaysky
2000-09-26 13:57 ` Ivan Kokshaysky
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