This is the mail archive of the gcc-patches@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]

sparc bugfix



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)		\
      {									\







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