This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Cross-compile bug in sparc64
- To: egcs-bugs at cygnus dot com
- Subject: Cross-compile bug in sparc64
- From: "Eduardo E. Horvath" <eeh at one-o dot com>
- Date: Sat, 29 Aug 1998 11:34:25 -0700 (PDT)
There seems to be a bug when cross-compiling from sparc to sparc64. The
code in sparc_emit_set_const32() checks to see if the values can be
generated by SPARC_SETHI_P() or SPARC_SIMM13_P(), in which case getting
here is an error because this could have been generated by a single
instruction.
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:
Index: sparc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sparc/sparc.c,v
retrieving revision 1.50
diff -c -r1.50 sparc.c
*** sparc.c 1998/08/28 20:13:44 1.50
--- sparc.c 1998/08/29 18:33:55
***************
*** 1152,1158 ****
{
HOST_WIDE_INT value = INTVAL (op1);
! if (SPARC_SETHI_P (value)
|| SPARC_SIMM13_P (value))
abort ();
}
--- 1152,1159 ----
{
HOST_WIDE_INT value = INTVAL (op1);
! if (!(TARGET_ARCH64 &&
! SPARC_SETHI_P (value))
|| SPARC_SIMM13_P (value))
abort ();
}
=========================================================================
Eduardo Horvath eeh@one-o.com
"I need to find a pithy new quote." -- me