summaryrefslogtreecommitdiff
path: root/gcc/config/picochip
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-16 14:25:07 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-16 14:25:07 +0000
commitbd99ba644995e1def47dc92160427cba7aa04b94 (patch)
treee272ca26ebebda9e3693e93448028f82a90b0575 /gcc/config/picochip
parentc7e41aee2b459879f2e093101b0a4bd661a15563 (diff)
downloadgcc-bd99ba644995e1def47dc92160427cba7aa04b94.tar.gz
* builtins.c (std_gimplify_va_arg_expr): Use
targetm.calls.function_arg_boundary. * function.c (assign_parms, locate_and_pad_parm): Likewise. * calls.c (struct arg_data): Update comment. * defaults.h (FUNCTION_ARG_BOUNDARY): Delete. * target.def (function_arg_boundary): Define. * targhooks.h (default_function_arg_boundary): Declare. * targhooks.c (default_function_arg_boundary): Define. * doc/tm.texi.in (FUNCTION_ARG_PADDING): Use TARGET_FUNCTION_ARG_BOUNDARY. (FUNCTION_ARG_BOUNDARY): Delete. (TARGET_FUNCTION_ARG_BOUNDARY): New. * doc/tm.texi: Regenerate. * system.h (FUNCTION_ARG_BOUNDARY): Poison. * config/arc/arc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arc/arc.c (arc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/arm/arm.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arm/arm-protos.h (arm_needs_doubleword_align): Delete. * config/arm/arm.c (arm_needs_doubleword_align): Make static. (arm_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/frv/frv.h (FUNCTION_ARG_BOUNDARY): Delete. * config/frv/frv-protos.h (frv_function_arg_boundary): Delete. * config/frv/frv.c (frv_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/i386/i386.h (FUNCTION_ARG_BOUNDARY): Delete. * config/i386/i386-protos.h (ix86_function_arg_boundary): Delete. * config/i386/i386.c (ix86_function_arg_boundary): Make static. (ix86_compat_function_arg_boundary): Take and return unsigned int. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Delete. * config/ia64/ia64-protos.h (ia64_function_arg_boundary): Delete. * config/ia64/ia64.c (ia64_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32c/m32c.h (FUNCTION_ARG_BOUNDARY): Delete. * config/m32c/m32c.c (m32c_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32r/m32r.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.c (mcore_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mips/mips-protos.h (mips_function_arg_boundary): Delete. * config/mips/mips.c (mips_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/pa/pa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/pa/pa.c (pa_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/picochip/picochip.h (FUNCTION_ARG_BOUNDARY): Delete. * config/picochip/picochip-protos.h (picochip_get_function_arg_boundary): Delete. * config/picochip/picochip.c (picochip_get_function_arg_boundary): Rename to... (picochip_function_arg_boundary): ...this. Make static. (picochip_function_arg, picochip_arg_partial_bytes): Adjust. (picochip_arg_advance): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rs6000/rs6000.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rs6000/rs6000-protos.h (function_arg_boundary): Delete. * config/rs6000/rs6000.c (function_arg_boundary): Rename to... (rs6000_function_arg_boundary): ...this. Make static. (rs6000_parm_start, rs6000_gimplify_va_arg): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rx/rx.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rx/rx.c (rx_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/sparc/sparc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/sparc/sparc.c (sparc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/xtensa/xtensa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/xtensa/xtensa-protos.h (function_arg_boundary): Delete. * config/xtensa/xtensa.c (function_arg_boundary): Rename to... (xtensa_function_arg_boundary): ...this. Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/picochip')
-rw-r--r--gcc/config/picochip/picochip-protos.h2
-rw-r--r--gcc/config/picochip/picochip.c16
-rw-r--r--gcc/config/picochip/picochip.h7
3 files changed, 11 insertions, 14 deletions
diff --git a/gcc/config/picochip/picochip-protos.h b/gcc/config/picochip/picochip-protos.h
index 1545f41b69c..991c028afba 100644
--- a/gcc/config/picochip/picochip-protos.h
+++ b/gcc/config/picochip/picochip-protos.h
@@ -66,8 +66,6 @@ extern int picochip_absolute_memory_operand (rtx op, enum machine_mode mode);
extern rtx picochip_function_value (const_tree valtype, const_tree func, bool outgoing);
extern int picochip_symbol_offset (rtx operand);
-extern int picochip_get_function_arg_boundary (enum machine_mode mode);
-
extern reg_class_t picochip_secondary_reload(bool in_p,
rtx x,
reg_class_t cla,
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 1dbbc9d5f0c..f7c5baf9b94 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -89,6 +89,8 @@ rtx picochip_incoming_function_arg (CUMULATIVE_ARGS * p_cum,
const_tree type, bool named);
void picochip_arg_advance (CUMULATIVE_ARGS * p_cum, enum machine_mode mode,
const_tree type, bool named);
+unsigned int picochip_function_boundary (enum machine_mode mode,
+ const_tree type);
int picochip_sched_lookahead (void);
int picochip_sched_issue_rate (void);
@@ -286,6 +288,9 @@ static const struct default_options picochip_option_optimization_table[] =
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE picochip_arg_advance
+#undef TARGET_FUNCTION_ARG_BOUNDARY
+#define TARGET_FUNCTION_ARG_BOUNDARY picochip_function_arg_boundary
+
#undef TARGET_PROMOTE_FUNCTION_MODE
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
#undef TARGET_PROMOTE_PROTOTYPES
@@ -851,7 +856,7 @@ picochip_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
/* Compute the alignment and size of the parameter. */
type_align_in_units =
- picochip_get_function_arg_boundary (mode) / BITS_PER_UNIT;
+ picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
type_size_in_units = picochip_compute_arg_size (type, mode);
/* Compute the correct offset (i.e., ensure that the offset meets
@@ -947,8 +952,9 @@ picochip_incoming_function_arg (CUMULATIVE_ARGS *cum,
/* Gives the alignment boundary, in bits, of an argument with the
specified mode. */
-int
-picochip_get_function_arg_boundary (enum machine_mode mode)
+unsigned int
+picochip_function_arg_boundary (enum machine_mode mode,
+ const_tree type ATTRIBUTE_UNUSED)
{
int align;
@@ -983,7 +989,7 @@ picochip_arg_partial_bytes (CUMULATIVE_ARGS * p_cum, enum machine_mode mode,
/* Compute the alignment and size of the parameter. */
type_align_in_units =
- picochip_get_function_arg_boundary (mode) / BITS_PER_UNIT;
+ picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
type_size_in_units = picochip_compute_arg_size (type, mode);
/* Compute the correct offset (i.e., ensure that the offset meets
@@ -1037,7 +1043,7 @@ picochip_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
/* Compute the alignment and size of the parameter. */
type_align_in_units =
- picochip_get_function_arg_boundary (mode) / BITS_PER_UNIT;
+ picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
type_size_in_units = picochip_compute_arg_size (type, mode);
/* Compute the correct offset (i.e., ensure that the offset meets
diff --git a/gcc/config/picochip/picochip.h b/gcc/config/picochip/picochip.h
index 2c311822eed..5f6bc7b2c07 100644
--- a/gcc/config/picochip/picochip.h
+++ b/gcc/config/picochip/picochip.h
@@ -404,13 +404,6 @@ extern const enum reg_class picochip_regno_reg_class[FIRST_PSEUDO_REGISTER];
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \
((CUM) = 0)
-/* Originally this used TYPE_ALIGN to determine the
- alignment. Unfortunately, this fails in some cases, because the
- type is unknown (e.g., libcall's). Instead, use GET_MODE_ALIGNMENT
- since the mode is always present. */
-#define FUNCTION_ARG_BOUNDARY(MODE,TYPE) \
- picochip_get_function_arg_boundary(MODE)
-
/* The first 6 registers can hold parameters. */
#define FUNCTION_ARG_REGNO_P(REGNO) ((REGNO) < 6)