This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cross-compile bug in sparc64


   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]