OSDN Git Service

* config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Sep 2000 14:14:34 +0000 (14:14 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Sep 2000 14:14:34 +0000 (14:14 +0000)
op0 is a SUBREG.
(function_arg_slotno): Accept TImode/CTImode.
* config/sparc/sparc.h (MIN_UNITS_PER_WORD): If IN_LIBGCC2 define
to UNITS_PER_WORD.

        * gcc.c-torture/compile/20000923-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36645 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20000923-1.c [new file with mode: 0644]

index 8c8b234..3a7a28e 100644 (file)
@@ -1,3 +1,11 @@
+2000-09-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when
+       op0 is a SUBREG.
+       (function_arg_slotno): Accept TImode/CTImode.
+       * config/sparc/sparc.h (MIN_UNITS_PER_WORD): If IN_LIBGCC2 define
+       to UNITS_PER_WORD.
+
 2000-09-26  Michael Hayes  <mhayes@cygnus.com>
 
        * flow.c (flow_loop_pre_header_scan): Punt if loop enters
index 82e9a74..ec3329b 100644 (file)
@@ -1832,12 +1832,17 @@ sparc_emit_set_const64 (op0, op1)
   rtx temp;
 
   /* Sanity check that we know what we are working with.  */
-  if (! TARGET_ARCH64
-      || GET_CODE (op0) != REG
-      || (REGNO (op0) >= SPARC_FIRST_FP_REG
-         && REGNO (op0) <= SPARC_LAST_V9_FP_REG))
+  if (! TARGET_ARCH64)
     abort ();
 
+  if (GET_CODE (op0) != SUBREG)
+    {
+      if (GET_CODE (op0) != REG
+         || (REGNO (op0) >= SPARC_FIRST_FP_REG
+             && REGNO (op0) <= SPARC_LAST_V9_FP_REG))
+       abort ();
+    }
+
   if (reload_in_progress || reload_completed)
     temp = op0;
   else
@@ -3971,6 +3976,7 @@ function_arg_slotno (cum, mode, type, named, incoming_p, pregno, ppadding)
     case HImode : case CHImode :
     case SImode : case CSImode :
     case DImode : case CDImode :
+    case TImode : case CTImode :
       if (slotno >= SPARC_INT_ARG_MAX)
        return -1;
       regno = regbase + slotno;
index 2004c60..aedccd1 100644 (file)
@@ -765,7 +765,11 @@ extern struct sparc_cpu_select sparc_select[];
 
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD         (TARGET_ARCH64 ? 8 : 4)
+#ifdef IN_LIBGCC2
+#define MIN_UNITS_PER_WORD     UNITS_PER_WORD
+#else
 #define MIN_UNITS_PER_WORD     4
+#endif
 
 /* Now define the sizes of the C data types.  */
 
index e3fb537..3d9863b 100644 (file)
@@ -1,3 +1,7 @@
+2000-09-26  Jakub Jelinek  <jakub@redhat.com>
+
+        * gcc.c-torture/compile/20000923-1.c: New test.
+
 2000-09-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
 
        * g++.old-deja/g++.other/crash20.C: Make ready for libstdc++-v3.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000923-1.c b/gcc/testsuite/gcc.c-torture/compile/20000923-1.c
new file mode 100644 (file)
index 0000000..9ed9886
--- /dev/null
@@ -0,0 +1,8 @@
+const int a = 3;
+const int b = 50;
+
+void foo (void)
+{
+  long int x[a][b];
+  asm ("" : : "r" (x) : "memory");
+}