diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/mmix/mmix.c | 18 | ||||
-rw-r--r-- | gcc/config/mmix/mmix.h | 9 |
3 files changed, 23 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4321801..138d0e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 4f79df2..e28c3b8 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -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 diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h index 501837e..fd0bb1c 100644 --- a/gcc/config/mmix/mmix.h +++ b/gcc/config/mmix/mmix.h @@ -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 |