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: snapshot bootstrap fails on hppa1.1-hpux11.00


Forwarded message:
From dave Wed Jan 24 01:45:31 EST 2001
Subject: Re: snapshot bootstrap fails on hppa1.1-hpux11.00
To: gcc-bug@gcc.gnu.org
Date: Wed, 24 Jan 2001 01:45:31 -0500 (EST)
From: "John David Anglin" <dave@hiauly1>
Cc: law@redhat.com, alan@linuxcare.com, sammy_yu@hp.com
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 4221      

>>   In message <6BD67FFB937FD411A04F00D0B74FE87802090B10@xrose06.rose.hp.com>you 
>> write:
>>   > Hi,
>>   >   I'm having problems compiling yesterday's (1/22/2001) and today's
>>   > snapshot on hppa1.1-hpux11.00.  It gets thru stage3 and tries to compile
>>   > libstdc++ and aborts with internal compile error.
>> [ ... ]
>> Yes.  If you'd followed the development lists, this is the bug I'm 
>> currently working on :-)

I believe that this is a reload bug.  For example, the mem in this insn

(define_insn ""
  [(set (match_operand:SI 0 "register_operand" "=r")
        (mem:SI
	 (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
		    (unspec:SI
		       [(match_operand:SI 2 "symbolic_operand" "")] 0))))]
  ""
  "*
{
  if (flag_pic != 2)
    abort ();
  return \"ldw RT'%G2(%1),%0\";
}"
  [(set_attr "type" "load")
   (set_attr "length" "4")])

can get reloaded into 

(define_insn ""
  [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand"
				"=r,r,r,r,r,Q,*q,!f,f,*TR")
	(match_operand:SI 1 "move_operand"
				"r,J,N,K,RQ,rM,rM,!fM,*RT,f"))]
  "(register_operand (operands[0], SImode)
    || reg_or_0_operand (operands[1], SImode))
   && ! TARGET_SOFT_FLOAT"
  "@
   copy %1,%0
   ldi %1,%0
   ldil L'%1,%0
   {zdepi|depwi,z} %Z1,%0
   ldw%M1 %1,%0
   ...

print_operand isn't up to handling this substitution (predicate and
constraints don't match either but reload doesn't seem to care).

I enclose a couple of patches that I was working on.  I believe Jeff
was working on trying to fix reload.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

--- pa.c.orig	Tue Dec 19 13:19:56 2000
+++ pa.c	Wed Dec 20 16:06:23 2000
@@ -337,14 +337,6 @@
 
   op = XEXP (op, 0);
 
-  /* The LO_SUM part of a DLT reference is not considered a move_operand;
-     we must reject it here since it must be accepted by memory_address_p.  */
-  if (GET_CODE (op) == LO_SUM
-      && GET_CODE (XEXP (op, 0)) == REG
-      && REG_OK_FOR_BASE_P (XEXP (op, 0))
-      && GET_CODE (XEXP (op, 1)) == UNSPEC)
-    return 0;
-
   /* Since move_operand is only used for source operands, we can always
      allow scaled indexing!  */
   if (! TARGET_DISABLE_INDEXING
@@ -4165,6 +4157,17 @@
 	    fprintf (file, "%s(%s)",
 		     reg_names [REGNO (XEXP (XEXP (XEXP (x, 0), 1), 0))],
 		     reg_names [REGNO (XEXP (XEXP (x, 0), 0))]);
+          else if (flag_pic == 2
+		   && GET_CODE (XEXP (x, 0)) == LO_SUM
+                   && GET_CODE (XEXP (XEXP (x, 0), 0)) == REG
+                   && GET_CODE (XEXP (XEXP (x, 0), 1)) == UNSPEC)
+            {
+              fputs ("RT'", file);
+              output_global_address (file,
+				     XVECEXP (XEXP (XEXP (x, 0), 1), 0, 0), 0);
+              fprintf (file, "(%s)",
+		       reg_names [REGNO (XEXP (XEXP (x, 0), 0))]);
+	    }
 	  else
 	    output_address (XEXP (x, 0));
 	  break;
--- pa.md.orig	Wed Dec  6 20:06:47 2000
+++ pa.md	Wed Dec 20 14:59:34 2000
@@ -2346,41 +2346,6 @@
   [(set_attr "type" "binary")
    (set_attr "length" "4")])
 
-; We need this to make sure CSE doesn't simplify a memory load with a
-; symbolic address, whose content it think it knows.  For PIC, what CSE
-; think is the real value will be the address of that value.
-(define_insn ""
-  [(set (match_operand:SI 0 "register_operand" "=r")
-	(mem:SI
-	  (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
-		     (unspec:SI
-			[(match_operand:SI 2 "symbolic_operand" "")] 0))))]
-  ""
-  "*
-{
-  if (flag_pic != 2)
-    abort ();
-  return \"ldw RT'%G2(%1),%0\";
-}"
-  [(set_attr "type" "load")
-   (set_attr "length" "4")])
-
-(define_insn ""
-  [(set (match_operand:DI 0 "register_operand" "=r")
-	(mem:DI
-	  (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
-		     (unspec:DI
-			[(match_operand:DI 2 "symbolic_operand" "")] 0))))]
-  "TARGET_64BIT"
-  "*
-{
-  if (flag_pic != 2)
-    abort ();
-  return \"ldd RT'%G2(%1),%0\";
-}"
-  [(set_attr "type" "load")
-   (set_attr "length" "4")])
-
 ;; Always use addil rather than ldil;add sequences.  This allows the
 ;; HP linker to eliminate the dp relocation if the symbolic operand
 ;; lives in the TEXT space.


-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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