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]

Re: c/2386: gcc -mcpu=ultrasparc SIGSEGV's on some code involvinglong long and pointers.


On 25 Mar 2001 grubba@roxen.com wrote:

> gcc dies with SIGSEGV when compiling the attached file with -mcpu=ultrasparc.
> >How-To-Repeat:
> $ gcc -mcpu=ultrasparc -c foo.c -o foo.o
> gcc: Internal compiler error: program cc1 got fatal signal 11

Fixed by backporting this patch to the 2.95 branch.  See also
  http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01344.html


Bernd

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.3667.4.346
diff -u -p -r1.3667.4.346 ChangeLog
--- ChangeLog	2001/03/30 13:46:49	1.3667.4.346
+++ ChangeLog	2001/03/30 14:00:21
@@ -11,6 +11,10 @@
 	* mips.md: Define conditional move patterns for floating point
 	operands and DI mode conditions.

+	2000-11-25  Jakub Jelinek  <jakub@redhat.com>
+	* config/sparc/sparc.md (muldi3_v8plus): Remove H constraint.
+	Handle CONST_INT as second argument.
+
 2001-03-28  Bernd Schmidt  <bernds@redhat.com>

 	* flow.c (propagate_block): When trying to delete a case vector, cope
Index: config/sparc/sparc.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sparc/sparc.md,v
retrieving revision 1.71.4.4
diff -u -p -r1.71.4.4 sparc.md
--- sparc.md	2001/01/25 14:03:37	1.71.4.4
+++ sparc.md	2001/03/30 14:00:21
@@ -5211,7 +5211,7 @@
 (define_insn "muldi3_v8plus"
   [(set (match_operand:DI 0 "register_operand" "=r,h")
 	(mult:DI (match_operand:DI 1 "arith_double_operand" "%r,0")
-		 (match_operand:DI 2 "arith_double_operand" "rHI,rHI")))
+		 (match_operand:DI 2 "arith_double_operand" "rI,rI")))
    (clobber (match_scratch:SI 3 "=&h,X"))
    (clobber (match_scratch:SI 4 "=&h,X"))]
   "TARGET_V8PLUS"
@@ -5221,6 +5221,13 @@
     output_asm_insn (\"srl\\t%L1, 0, %L1\", operands);
   if (which_alternative == 1)
     output_asm_insn (\"sllx\\t%H1, 32, %H1\", operands);
+  if (GET_CODE (operands[2]) == CONST_INT)
+    {
+      if (which_alternative == 1)
+	return \"or\\t%L1, %H1, %H1\\n\\tmulx\\t%H1, %2, %L0\;srlx\\t%L0, 32, %H0\";
+      else
+	return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\";
+    }
   if (sparc_check_64 (operands[2], insn) <= 0)
     output_asm_insn (\"srl\\t%L2, 0, %L2\", operands);
   if (which_alternative == 1)


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