summaryrefslogtreecommitdiff
path: root/gcc/config/mep
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-09 14:16:42 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-09 14:16:42 +0000
commit4f6b272a3416bd54562fcfec53e71b45e22c7b9b (patch)
tree925454b9b4d398edbea9ceeeb3c5887f7d5be3d9 /gcc/config/mep
parent737f8866ff8e6f79a925ef7da457fd2db9107bab (diff)
downloadgcc-4f6b272a3416bd54562fcfec53e71b45e22c7b9b.tar.gz
* config/mep/mep-protos.h (mep_function_arg): Delete.
(mep_function_arg_advance): Delete. * config/mep/mep.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/mep/mep.c (mep_function_arg): Make static. Take a const_tree and a bool. (mep_function_arg_advance): Likewise. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mep')
-rw-r--r--gcc/config/mep/mep-protos.h2
-rw-r--r--gcc/config/mep/mep.c37
-rw-r--r--gcc/config/mep/mep.h11
3 files changed, 26 insertions, 24 deletions
diff --git a/gcc/config/mep/mep-protos.h b/gcc/config/mep/mep-protos.h
index 4ab86b5faab..c8a0b9b3523 100644
--- a/gcc/config/mep/mep-protos.h
+++ b/gcc/config/mep/mep-protos.h
@@ -75,8 +75,6 @@ extern void mep_print_operand_address (FILE *, rtx);
extern void mep_print_operand (FILE *, rtx, int);
extern void mep_final_prescan_insn (rtx, rtx *, int);
extern void mep_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
-extern rtx mep_function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
-extern void mep_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern bool mep_return_in_memory (const_tree, const_tree);
extern rtx mep_function_value (tree, tree);
extern rtx mep_libcall_value (enum machine_mode);
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 712abbe5f2a..daa56c8f278 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -216,6 +216,10 @@ static void mep_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
tree, int *, int);
static bool mep_pass_by_reference (CUMULATIVE_ARGS * cum, enum machine_mode,
const_tree, bool);
+static rtx mep_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static void mep_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
static bool mep_vector_mode_supported_p (enum machine_mode);
static bool mep_handle_option (size_t, const char *, int);
static rtx mep_allocate_initial_value (rtx);
@@ -3717,23 +3721,29 @@ mep_init_cumulative_args (CUMULATIVE_ARGS *pcum, tree fntype,
pcum->vliw = 0;
}
-rtx
-mep_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
- tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
+/* The ABI is thus: Arguments are in $1, $2, $3, $4, stack. Arguments
+ larger than 4 bytes are passed indirectly. Return value in 0,
+ unless bigger than 4 bytes, then the caller passes a pointer as the
+ first arg. For varargs, we copy $1..$4 to the stack. */
+
+static rtx
+mep_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type ATTRIBUTE_UNUSED,
+ bool named ATTRIBUTE_UNUSED)
{
/* VOIDmode is a signal for the backend to pass data to the call
expander via the second operand to the call pattern. We use
this to determine whether to use "jsr" or "jsrv". */
if (mode == VOIDmode)
- return GEN_INT (cum.vliw);
+ return GEN_INT (cum->vliw);
/* If we havn't run out of argument registers, return the next. */
- if (cum.nregs < 4)
+ if (cum->nregs < 4)
{
if (type && TARGET_IVC2 && VECTOR_TYPE_P (type))
- return gen_rtx_REG (mode, cum.nregs + 49);
+ return gen_rtx_REG (mode, cum->nregs + 49);
else
- return gen_rtx_REG (mode, cum.nregs + 1);
+ return gen_rtx_REG (mode, cum->nregs + 1);
}
/* Otherwise the argument goes on the stack. */
@@ -3762,10 +3772,11 @@ mep_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED,
return true;
}
-void
-mep_arg_advance (CUMULATIVE_ARGS *pcum,
- enum machine_mode mode ATTRIBUTE_UNUSED,
- tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
+static void
+mep_function_arg_advance (CUMULATIVE_ARGS *pcum,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ const_tree type ATTRIBUTE_UNUSED,
+ bool named ATTRIBUTE_UNUSED)
{
pcum->nregs += 1;
}
@@ -7405,6 +7416,10 @@ mep_asm_init_sections (void)
#define TARGET_SETUP_INCOMING_VARARGS mep_setup_incoming_varargs
#undef TARGET_PASS_BY_REFERENCE
#define TARGET_PASS_BY_REFERENCE mep_pass_by_reference
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG mep_function_arg
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE mep_function_arg_advance
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P mep_vector_mode_supported_p
#undef TARGET_HANDLE_OPTION
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index ad2cf306a5a..07f0c856af2 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -499,14 +499,6 @@ extern unsigned int mep_selected_isa;
-/* The ABI is thus: Arguments are in $1, $2, $3, $4, stack. Arguments
- larger than 4 bytes are passed indirectly. Return value in 0,
- unless bigger than 4 bytes, then the caller passes a pointer as the
- first arg. For varargs, we copy $1..$4 to the stack. */
-
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- mep_function_arg (CUM, MODE, TYPE, NAMED)
-
#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 1
typedef struct
@@ -518,9 +510,6 @@ typedef struct
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
mep_init_cumulative_args (& (CUM), FNTYPE, LIBNAME, FNDECL)
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- mep_arg_advance (& (CUM), MODE, TYPE, NAMED)
-
#define FUNCTION_ARG_REGNO_P(REGNO) \
(((REGNO) >= 1 && (REGNO) <= 4) \
|| ((REGNO) >= FIRST_CR_REGNO + 1 \