aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-10-09 14:21:10 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-10-09 14:21:10 +0000
commitfd29bdaffea19f0aac0be23bec5b8bb2b52054da (patch)
tree37228f806eb88eef5cddab82726449cc9f806726 /gcc
parent13d3961c1535b422ee56e2eb8350b4960d603c5a (diff)
downloadgcc-fd29bdaffea19f0aac0be23bec5b8bb2b52054da.zip
gcc-fd29bdaffea19f0aac0be23bec5b8bb2b52054da.tar.gz
gcc-fd29bdaffea19f0aac0be23bec5b8bb2b52054da.tar.bz2
pa-protos.h (function_arg): Delete.
* config/pa/pa-protos.h (function_arg): Delete. * config/pa/pa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/pa/pa.c (function_arg): Rename to... (pa_function_arg): ...this. Make static. Take a const_tree and a bool. (pa_function_arg_advance): New function. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. From-SVN: r165228
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/pa/pa-protos.h4
-rw-r--r--gcc/config/pa/pa.c31
-rw-r--r--gcc/config/pa/pa.h17
4 files changed, 38 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0b5968..9c2e1ca 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
+ * config/pa/pa-protos.h (function_arg): Delete.
+ * config/pa/pa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+ * config/pa/pa.c (function_arg): Rename to...
+ (pa_function_arg): ...this. Make static. Take a const_tree and
+ a bool.
+ (pa_function_arg_advance): New function.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
+
* config/m68k/m68k.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/m68k/m68k.c (m68k_function_arg): New function.
(m68k_function_arg_advance): New function.
diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h
index 8097c58..085b648 100644
--- a/gcc/config/pa/pa-protos.h
+++ b/gcc/config/pa/pa-protos.h
@@ -151,10 +151,6 @@ extern int cmpib_comparison_operator (rtx, enum machine_mode);
/* Miscellaneous functions in pa.c. */
#ifdef TREE_CODE
extern int reloc_needed (tree);
-#ifdef RTX_CODE
-extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode,
- tree, int);
-#endif
extern bool pa_return_in_memory (const_tree, const_tree);
#endif /* TREE_CODE */
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index e114dd1..08d63e5 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -160,6 +160,10 @@ static bool pa_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static int pa_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
+static void pa_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static rtx pa_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
static struct machine_function * pa_init_machine_status (void);
static reg_class_t pa_secondary_reload (bool, rtx, reg_class_t,
enum machine_mode,
@@ -334,6 +338,10 @@ static size_t n_deferred_plabels = 0;
#define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
#undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES pa_arg_partial_bytes
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG pa_function_arg
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE pa_function_arg_advance
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
#define TARGET_EXPAND_BUILTIN_SAVEREGS hppa_builtin_saveregs
@@ -9365,6 +9373,23 @@ pa_function_value_regno_p (const unsigned int regno)
return false;
}
+/* Update the data in CUM to advance over an argument
+ of mode MODE and data type TYPE.
+ (TYPE is null for libcalls where that information may not be available.) */
+
+static void
+pa_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+ int arg_size = FUNCTION_ARG_SIZE (mode, type);
+
+ cum->nargs_prototype--;
+ cum->words += (arg_size
+ + ((cum->words & 01)
+ && type != NULL_TREE
+ && arg_size > 1));
+}
+
/* Return the location of a parameter that is passed in a register or NULL
if the parameter has any component that is passed in memory.
@@ -9373,9 +9398,9 @@ pa_function_value_regno_p (const unsigned int regno)
??? We might want to restructure this so that it looks more like other
ports. */
-rtx
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
- int named ATTRIBUTE_UNUSED)
+static rtx
+pa_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int max_arg_words = (TARGET_64BIT ? 8 : 4);
int alignment = 0;
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index ae768b2e..e637e68 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -634,17 +634,6 @@ struct hppa_args {int words, nargs_prototype, incoming, indirect; };
? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \
: int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-/* Update the data in CUM to advance over an argument
- of mode MODE and data type TYPE.
- (TYPE is null for libcalls where that information may not be available.) */
-
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-{ (CUM).nargs_prototype--; \
- (CUM).words += FUNCTION_ARG_SIZE(MODE, TYPE) \
- + (((CUM).words & 01) && (TYPE) != 0 \
- && FUNCTION_ARG_SIZE(MODE, TYPE) > 1); \
-}
-
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
or a hard register in which to store the argument.
@@ -707,12 +696,6 @@ struct hppa_args {int words, nargs_prototype, incoming, indirect; };
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
function_arg_padding ((MODE), (TYPE))
-/* Do not expect to understand this without reading it several times. I'm
- tempted to try and simply it, but I worry about breaking something. */
-
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- function_arg (&CUM, MODE, TYPE, NAMED)
-
/* If defined, a C expression that gives the alignment boundary, in
bits, of an argument with the specified mode and type. If it is
not defined, `PARM_BOUNDARY' is used for all arguments. */