This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
sparc bugfix
- To: "David S. Miller" <davem at pierdol dot cobaltmicro dot com>
- Subject: sparc bugfix
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 15 Jan 1999 17:51:56 -0800
- cc: rth at cygnus dot com, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
The sparc port was aborting while building libstdc++ because it created
a insn of the form:
(set (reg:TF 36 %f4)
(mem:TF (lo_sum:SI (high:SI (symbol_ref/u:SI ("*.LLC0")))
(symbol_ref/u:SI ("*.LLC0"))) 0))
GO_IF_LEGITIMATE_ADDRESS and input_operand reject TFmode memory references
with an address involving a LO_SUM if ! TARGET_V9.
However, LEGITIMIZE_RELOAD_ADDRESS would unconditionally create these lo_sum
addresses without looking at the mode of the MEM. Thus leading to the abort.
I checked in this patch to fix the problem. I'm pretty sure it's the right
fix. If it isn't or if you want me to tweak it in some way, just say so
and I'll make whatever changes you request.
* sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Do not create
(mem (lo_sum (...)) for TFmode unless TARGET_V9.
Index: sparc.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/sparc/sparc.h,v
retrieving revision 1.112
diff -c -3 -p -r1.112 sparc.h
*** sparc.h 1999/01/15 07:37:22 1.112
--- sparc.h 1999/01/16 01:42:51
*************** do {
*** 2572,2577 ****
--- 2572,2578 ----
/* Decompose SImode constants into hi+lo_sum. We do have to \
rerecognize what we produce, so be careful. */ \
if (CONSTANT_P (X) \
+ && (MODE != TFmode || TARGET_V9) \
&& GET_MODE (X) == SImode \
&& GET_CODE (X) != LO_SUM && GET_CODE (X) != HIGH) \
{ \