OSDN Git Service

PR target/18347
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Nov 2004 19:52:55 +0000 (19:52 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Nov 2004 19:52:55 +0000 (19:52 +0000)
* config/mmix/mmix.c (mmix_function_outgoing_value): Handle
TImode.  Sorry for other non-complex larger-than-64-bit modes.
* config/mmix/mmix.h (MIN_UNITS_PER_WORD): Do not define.

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

gcc/ChangeLog
gcc/config/mmix/mmix.c
gcc/config/mmix/mmix.h

index 4321801..138d0e3 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-13  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       PR target/18347
+       * config/mmix/mmix.c (mmix_function_outgoing_value): Handle
+       TImode.  Sorry for other non-complex larger-than-64-bit modes.
+       * config/mmix/mmix.h (MIN_UNITS_PER_WORD): Do not define.
+
 2004-11-13  Kelley Cook  <kcook@gcc.gnu.org>
 
        * doc/install.texi (automake): Document that everything now uses 1.9.
index 4f79df2..e28c3b8 100644 (file)
@@ -644,8 +644,22 @@ mmix_function_outgoing_value (tree valtype, tree func ATTRIBUTE_UNUSED)
     return
       gen_rtx_REG (mode, MMIX_OUTGOING_RETURN_VALUE_REGNUM);
 
-  /* A complex type, made up of components.  */
-  cmode = TYPE_MODE (TREE_TYPE (valtype));
+  if (COMPLEX_MODE_P (mode))
+    /* A complex type, made up of components.  */
+    cmode = TYPE_MODE (TREE_TYPE (valtype));
+  else
+    {
+      /* Of the other larger-than-register modes, we only support
+        scalar mode TImode.  (At least, that's the only one that's
+        been rudimentally tested.)  Make sure we're alerted for
+        unexpected cases.  */
+      if (mode != TImode)
+       sorry ("support for mode %qs", GET_MODE_NAME (mode));
+
+      /* In any case, we will fill registers to the natural size.  */
+      cmode = DImode;
+    }
+
   nregs = ((GET_MODE_BITSIZE (mode) + BITS_PER_WORD - 1) / BITS_PER_WORD);
 
   /* We need to take care of the effect of the register hole on return
index 501837e..fd0bb1c 100644 (file)
@@ -269,15 +269,6 @@ extern int target_flags;
 #define FLOAT_WORDS_BIG_ENDIAN 1
 #define UNITS_PER_WORD 8
 
-/* FIXME: This macro is correlated to MAX_FIXED_MODE_SIZE in that
-   e.g. this macro must not be 8 (default, UNITS_PER_WORD) when
-   MAX_FIXED_MODE_SIZE is 64 (default, DImode), or really: this must be
-   set manually if MAX_FIXED_MODE_SIZE is not at least twice the register
-   size.  By setting it to 4, we don't have to worry about TImode things
-   yet.  Revisit, perhaps get TImode going or get some solution that does
-   not mandate TImode or lie in other ways.  */
-#define MIN_UNITS_PER_WORD 4
-
 /* FIXME: Promotion of modes currently generates slow code, extending
    before every operation.  */
 /* I'm a little bit undecided about this one.  It might be beneficial to