This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Cross-compile bug in sparc64
- To: eeh at one-o dot com
- Subject: Re: Cross-compile bug in sparc64
- From: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Date: Sat, 29 Aug 1998 18:15:10 -0700
- CC: egcs-bugs at cygnus dot com
- References: <Pine.GSO.3.95.980829112547.10843A-100000@jericho>
Date: Sat, 29 Aug 1998 11:34:25 -0700 (PDT)
From: "Eduardo E. Horvath" <eeh@one-o.com>
Except on a 64-bit target if that constant is negative and can be
generated by a sethi, it still needs to be sign-extended. Here's my fix
for the problem:
You fix is not correct, for two reasons.
1) Even if your analysis was correct, the fix is wrong, and the
code below will never generate a 32-bit value sign extended
into a 64-bit one, because it uses sethi+or too.
2) Your analysis is wrong, this code generates 32-bit constants into a
register as an SImode value, ie. the sign bits in the upper 32-bits
of the register don't matter. If later this quantity is needed as
a full sign extended 64-bit version, the compiler will emit an insn
matching the extendsidi2 pattern or regenerate the constant as a
64-bit quantity into another register via sparc_emit_set_const64.
I imagine you saw a bug which led you to trying to fix this code,
could you show me what bug this is so I can see if a bug really exists
at all?
Later,
David S. Miller
davem@dm.cobaltmicro.com