diff options
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/i386-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 24 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 7 |
3 files changed, 14 insertions, 18 deletions
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 6cf6fe2ff03..7fb122dc6d8 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -216,7 +216,6 @@ extern int x86_field_alignment (tree, int); #endif extern rtx ix86_tls_get_addr (void); -extern bool ix86_must_pass_in_stack (enum machine_mode mode, tree); extern void ix86_expand_vector_init (rtx, rtx); /* In winnt.c */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index dafc60afe41..9b6e30e8fd8 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -928,6 +928,7 @@ static int extended_reg_mentioned_1 (rtx *, void *); static bool ix86_rtx_costs (rtx, int, int, int *); static int min_insn_size (rtx); static tree ix86_md_asm_clobbers (tree clobbers); +static bool ix86_must_pass_in_stack (enum machine_mode mode, tree type); #if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION) static void ix86_svr3_asm_out_constructor (rtx, int); @@ -1071,6 +1072,8 @@ static void init_ext_80387_constants (void); #define TARGET_STRUCT_VALUE_RTX ix86_struct_value_rtx #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS ix86_setup_incoming_varargs +#undef TARGET_MUST_PASS_IN_STACK +#define TARGET_MUST_PASS_IN_STACK ix86_must_pass_in_stack #undef TARGET_GIMPLIFY_VA_ARG_EXPR #define TARGET_GIMPLIFY_VA_ARG_EXPR ix86_gimplify_va_arg @@ -1905,6 +1908,16 @@ ix86_function_arg_regno_p (int regno) return false; } +/* Return if we do not know how to pass TYPE solely in registers. */ + +static bool +ix86_must_pass_in_stack (enum machine_mode mode, tree type) +{ + if (must_pass_in_stack_var_size_or_pad (mode, type)) + return true; + return (!TARGET_64BIT && type && mode == TImode); +} + /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is 0. */ @@ -2060,7 +2073,7 @@ classify_argument (enum machine_mode mode, tree type, return 0; if (mode != VOIDmode - && MUST_PASS_IN_STACK (mode, type)) + && targetm.calls.must_pass_in_stack (mode, type)) return 0; if (type && AGGREGATE_TYPE_P (type)) @@ -15848,15 +15861,6 @@ x86_emit_floatuns (rtx operands[2]) emit_label (donelab); } -/* Return if we do not know how to pass TYPE solely in registers. */ -bool -ix86_must_pass_in_stack (enum machine_mode mode, tree type) -{ - if (default_must_pass_in_stack (mode, type)) - return true; - return (!TARGET_64BIT && type && mode == TImode); -} - /* Initialize vector TARGET via VALS. */ void ix86_expand_vector_init (rtx target, rtx vals) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 631922b46c3..33cd861819f 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1662,13 +1662,6 @@ enum reg_class which. */ #define REG_PARM_STACK_SPACE(FNDECL) 0 -/* Define as a C expression that evaluates to nonzero if we do not know how - to pass TYPE solely in registers. The file expr.h defines a - definition that is usually appropriate, refer to expr.h for additional - documentation. If `REG_PARM_STACK_SPACE' is defined, the argument will be - computed in the stack and then loaded into a register. */ -#define MUST_PASS_IN_STACK(MODE, TYPE) ix86_must_pass_in_stack ((MODE), (TYPE)) - /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. FUNDECL is the declaration node of the function (as a tree), |