diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1992-09-24 22:11:57 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1992-09-24 22:11:57 +0000 |
commit | 1154b096fa7adf994299811ab5824de6c77e1f68 (patch) | |
tree | 869dd3617bb6d422088c3b3e2fa1a0d5517e7f01 | |
parent | f4f22302c4f5a8b25426e9af6bb7c592ac063916 (diff) | |
download | gcc-1154b096fa7adf994299811ab5824de6c77e1f68.zip gcc-1154b096fa7adf994299811ab5824de6c77e1f68.tar.gz gcc-1154b096fa7adf994299811ab5824de6c77e1f68.tar.bz2 |
Fix varardic functions returning structs.
From-SVN: r2235
-rw-r--r-- | gcc/config/mips/mips.c | 18 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 14 |
2 files changed, 10 insertions, 22 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 7936bc2..c795a24 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -2432,24 +2432,6 @@ init_cumulative_args (cum, fntype, libname) if (next_param == (tree)0 && TREE_VALUE (param) != void_type_node) cum->gp_reg_found = 1; } - - /* Determine if the function is returning a structure, if so, - advance by one argument. */ - - if (fntype - && (TREE_CODE (fntype) == FUNCTION_TYPE || TREE_CODE (fntype) == METHOD_TYPE) - && TREE_TYPE (fntype) != 0) - { - tree ret_type = TREE_TYPE (fntype); - enum tree_code ret_code = TREE_CODE (ret_type); - - if (ret_code == RECORD_TYPE || ret_code == UNION_TYPE) - { - cum->gp_reg_found = 1; - cum->arg_number = 1; - cum->arg_words = 1; - } - } } /* Advance the argument to the next argument position. */ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 09d85a4..ee8fd43 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -473,7 +473,7 @@ while (0) /* Print subsidiary information on the compiler version in use. */ -#define MIPS_VERSION "[AL 1.1, MM 26]" +#define MIPS_VERSION "[AL 1.1, MM 27]" #ifndef MACHINE_TYPE #define MACHINE_TYPE "BSD Mips" @@ -1205,9 +1205,15 @@ extern char mips_hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER]; /* Register in which static-chain is passed to a function. */ #define STATIC_CHAIN_REGNUM (GP_REG_FIRST + 2) -/* Register in which address to store a structure value - is passed to a function. */ -#define STRUCT_VALUE_REGNUM (GP_REG_FIRST + 4) +/* If the structure value address is passed in a register, then + `STRUCT_VALUE_REGNUM' should be the number of that register. */ +/* #define STRUCT_VALUE_REGNUM (GP_REG_FIRST + 4) */ + +/* If the structure value address is not passed in a register, define + `STRUCT_VALUE' as an expression returning an RTX for the place + where the address is passed. If it returns 0, the address is + passed as an "invisible" first argument. */ +#define STRUCT_VALUE ((rtx)0) /* Mips registers used in prologue/epilogue code when the stack frame is larger than 32K bytes. These registers must come from the |