public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] config: Fix up non-AArch64 target hooks
@ 2023-06-28 13:32 Alex Coplan
0 siblings, 0 replies; only message in thread
From: Alex Coplan @ 2023-06-28 13:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:299a497b14b564f40099c54d01d7e45eb6f57441
commit 299a497b14b564f40099c54d01d7e45eb6f57441
Author: Alex Coplan <alex.coplan@arm.com>
Date: Thu Apr 27 12:08:12 2023 +0100
config: Fix up non-AArch64 target hooks
In be61a38a5eeb79f1e21d57c069555af7c987a1e3 we add a boolean parameter
to the delegitimize_address target hook and in
c03e6907c735ef4c8aa98f6fed4ca3e3ce9eef1b we do the same with the
function_arg_boundary hook, but neither of those changes update the
target hook implementations in non-AArch64 backends.
This change fixes up the implementations of these target hooks for
non-AArch64 targets.
Diff:
---
gcc/config/arc/arc.c | 4 ++--
gcc/config/arm/arm.c | 4 ++--
gcc/config/bfin/bfin.c | 2 +-
gcc/config/c6x/c6x.c | 4 ++--
gcc/config/epiphany/epiphany.c | 17 +++++++++--------
gcc/config/epiphany/epiphany.h | 4 ++--
gcc/config/frv/frv.c | 6 ++++--
gcc/config/i386/i386.c | 11 ++++++-----
gcc/config/ia64/ia64.c | 5 +++--
gcc/config/iq2000/iq2000.c | 5 +++--
gcc/config/m32c/m32c.c | 5 +++--
gcc/config/m68k/m68k.c | 4 ++--
gcc/config/mcore/mcore.c | 6 ++++--
gcc/config/mips/mips.c | 8 ++++----
gcc/config/mn10300/mn10300.c | 2 +-
gcc/config/msp430/msp430.c | 4 ++--
gcc/config/nds32/nds32.c | 4 ++--
gcc/config/nios2/nios2.c | 2 +-
gcc/config/nvptx/nvptx.c | 3 ++-
gcc/config/or1k/or1k.c | 2 +-
gcc/config/pa/pa.c | 8 ++++----
gcc/config/riscv/riscv.c | 4 ++--
gcc/config/rl78/rl78.c | 3 ++-
gcc/config/rs6000/rs6000-call.c | 14 +++++++-------
gcc/config/rs6000/rs6000-internal.h | 2 +-
gcc/config/rs6000/rs6000.c | 2 +-
gcc/config/rx/rx.c | 3 ++-
gcc/config/s390/s390.c | 2 +-
gcc/config/sh/sh.c | 4 ++--
gcc/config/sparc/sparc.c | 9 +++++----
gcc/config/tilegx/tilegx.c | 6 +++---
gcc/config/tilepro/tilepro.c | 8 ++++----
gcc/config/xtensa/xtensa.c | 11 ++++++-----
33 files changed, 96 insertions(+), 82 deletions(-)
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 6b96c5e4bf5..6386cbe2a7b 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -657,7 +657,7 @@ arc_sched_issue_rate (void)
/* TARGET_PRESERVE_RELOAD_P is still awaiting patch re-evaluation / review. */
static bool arc_preserve_reload_p (rtx in) ATTRIBUTE_UNUSED;
-static rtx arc_delegitimize_address (rtx);
+static rtx arc_delegitimize_address (rtx, bool);
static bool arc_can_follow_jump (const rtx_insn *follower,
const rtx_insn *followee);
@@ -9829,7 +9829,7 @@ arc_delegitimize_address_0 (rtx op)
}
static rtx
-arc_delegitimize_address (rtx orig_x)
+arc_delegitimize_address (rtx orig_x, bool)
{
rtx x = orig_x;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 15268d03761..1d8a9e3e686 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -197,7 +197,7 @@ static rtx arm_function_arg (cumulative_args_t, const function_arg_info &);
static void arm_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static pad_direction arm_function_arg_padding (machine_mode, const_tree);
-static unsigned int arm_function_arg_boundary (machine_mode, const_tree);
+static unsigned int arm_function_arg_boundary (machine_mode, const_tree, bool);
static rtx aapcs_allocate_return_reg (machine_mode, const_tree,
const_tree);
static rtx aapcs_libcall_value (machine_mode);
@@ -7118,7 +7118,7 @@ arm_function_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
}
static unsigned int
-arm_function_arg_boundary (machine_mode mode, const_tree type)
+arm_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
if (!ARM_DOUBLEWORD_ALIGN)
return PARM_BOUNDARY;
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index d03b2590381..989983c9c88 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -1212,7 +1212,7 @@ bfin_return_addr_rtx (int count)
}
static rtx
-bfin_delegitimize_address (rtx orig_x)
+bfin_delegitimize_address (rtx orig_x, bool)
{
rtx x = orig_x;
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 39b0f753047..65bba8c9f9a 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -556,7 +556,7 @@ c6x_block_reg_pad_upward (machine_mode mode ATTRIBUTE_UNUSED,
/* Implement TARGET_FUNCTION_ARG_BOUNDARY. */
static unsigned int
-c6x_function_arg_boundary (machine_mode mode, const_tree type)
+c6x_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int boundary = type ? TYPE_ALIGN (type) : GET_MODE_BITSIZE (mode);
@@ -583,7 +583,7 @@ c6x_function_arg_boundary (machine_mode mode, const_tree type)
static unsigned int
c6x_function_arg_round_boundary (machine_mode mode, const_tree type)
{
- return c6x_function_arg_boundary (mode, type);
+ return c6x_function_arg_boundary (mode, type, true);
}
/* TARGET_FUNCTION_VALUE implementation. Returns an RTX representing the place
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 818bbf0a186..87d55076812 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -695,13 +695,13 @@ gen_compare_reg (machine_mode cmode, enum rtx_code code,
: ROUND_ADVANCE (GET_MODE_SIZE (MODE)))
/* Round CUM up to the necessary point for argument MODE/TYPE. */
-#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \
- (epiphany_function_arg_boundary ((MODE), (TYPE)) > BITS_PER_WORD \
+#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE, NAMED) \
+ (epiphany_function_arg_boundary ((MODE), (TYPE), (NAMED)) > BITS_PER_WORD \
? (((CUM) + 1) & ~1) \
: (CUM))
static unsigned int
-epiphany_function_arg_boundary (machine_mode mode, const_tree type)
+epiphany_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
if ((type ? TYPE_ALIGN (type) : GET_MODE_BITSIZE (mode)) <= PARM_BOUNDARY)
return PARM_BOUNDARY;
@@ -728,7 +728,7 @@ epiphany_setup_incoming_varargs (cumulative_args_t cum,
gcc_assert (arg.mode != BLKmode);
next_cum = *get_cumulative_args (cum);
- next_cum = (ROUND_ADVANCE_CUM (next_cum, arg.mode, arg.type)
+ next_cum = (ROUND_ADVANCE_CUM (next_cum, arg.mode, arg.type, arg.named)
+ ROUND_ADVANCE_ARG (arg.mode, arg.type));
first_anon_arg = next_cum;
@@ -753,7 +753,7 @@ epiphany_arg_partial_bytes (cumulative_args_t cum,
gcc_assert (!epiphany_pass_by_reference (cum, arg));
rounded_cum = ROUND_ADVANCE_CUM (*get_cumulative_args (cum),
- arg.mode, arg.type);
+ arg.mode, arg.type, arg.named);
if (rounded_cum < MAX_EPIPHANY_PARM_REGS)
{
words = MAX_EPIPHANY_PARM_REGS - rounded_cum;
@@ -2263,8 +2263,9 @@ epiphany_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
{
CUMULATIVE_ARGS cum = *get_cumulative_args (cum_v);
- if (PASS_IN_REG_P (cum, arg.mode, arg.type))
- return gen_rtx_REG (arg.mode, ROUND_ADVANCE_CUM (cum, arg.mode, arg.type));
+ if (PASS_IN_REG_P (cum, arg.mode, arg.type, arg.named))
+ return gen_rtx_REG (arg.mode, ROUND_ADVANCE_CUM (cum, arg.mode, arg.type,
+ arg.named));
return 0;
}
@@ -2275,7 +2276,7 @@ epiphany_function_arg_advance (cumulative_args_t cum_v,
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
- *cum = (ROUND_ADVANCE_CUM (*cum, arg.mode, arg.type)
+ *cum = (ROUND_ADVANCE_CUM (*cum, arg.mode, arg.type, arg.named)
+ ROUND_ADVANCE_ARG (arg.mode, arg.type));
}
\f
diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h
index e5d2282e5d4..398c80180db 100644
--- a/gcc/config/epiphany/epiphany.h
+++ b/gcc/config/epiphany/epiphany.h
@@ -523,8 +523,8 @@ typedef struct GTY (()) machine_function
This macro is only used in this file. */
/* We must use partial argument passing because of the chosen mode
of varargs handling. */
-#define PASS_IN_REG_P(CUM, MODE, TYPE) \
- (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < MAX_EPIPHANY_PARM_REGS)
+#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \
+ (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE), (NAMED)) < MAX_EPIPHANY_PARM_REGS)
\f
/* Tell GCC to use TARGET_RETURN_IN_MEMORY. */
#define DEFAULT_PCC_STRUCT_RETURN 0
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 125346dee8c..588bc0a2ce8 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -388,7 +388,8 @@ static rtx frv_function_incoming_arg (cumulative_args_t,
static void frv_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static unsigned int frv_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static void frv_output_dwarf_dtprel (FILE *, int, rtx)
ATTRIBUTE_UNUSED;
static reg_class_t frv_secondary_reload (bool, rtx, reg_class_t,
@@ -3089,7 +3090,8 @@ frv_must_pass_in_stack (const function_arg_info &arg)
static unsigned int
frv_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
- const_tree type ATTRIBUTE_UNUSED)
+ const_tree type ATTRIBUTE_UNUSED,
+ bool)
{
return BITS_PER_WORD;
}
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e07de05fd64..93b9c18cd84 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -405,7 +405,8 @@ static bool ext_80387_constants_init;
static rtx ix86_function_value (const_tree, const_tree, bool);
static bool ix86_function_value_regno_p (const unsigned int);
static unsigned int ix86_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static rtx ix86_static_chain (const_tree, bool);
static int ix86_function_regparm (const_tree, const_tree);
static void ix86_compute_frame_layout (void);
@@ -2896,7 +2897,7 @@ function_arg_advance_64 (CUMULATIVE_ARGS *cum, machine_mode mode,
}
else
{
- int align = ix86_function_arg_boundary (mode, type) / BITS_PER_WORD;
+ int align = ix86_function_arg_boundary (mode, type, named) / BITS_PER_WORD;
cum->words = ROUND_UP (cum->words, align);
cum->words += words;
return 0;
@@ -3460,7 +3461,7 @@ ix86_contains_aligned_value_p (const_tree type)
specified mode and type. */
static unsigned int
-ix86_function_arg_boundary (machine_mode mode, const_tree type)
+ix86_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int align;
if (type)
@@ -4535,7 +4536,7 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
aligned at MAX_SUPPORTED_STACK_ALIGNMENT. We will match callee
here with caller. */
- arg_boundary = ix86_function_arg_boundary (VOIDmode, type);
+ arg_boundary = ix86_function_arg_boundary (VOIDmode, type, false);
if ((unsigned int) arg_boundary > MAX_SUPPORTED_STACK_ALIGNMENT)
arg_boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
@@ -12005,7 +12006,7 @@ ix86_delegitimize_address_1 (rtx x, bool base_term_p)
/* The normal instantiation of the above template. */
static rtx
-ix86_delegitimize_address (rtx x)
+ix86_delegitimize_address (rtx x, bool)
{
return ix86_delegitimize_address_1 (x, false);
}
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index b51b26276ac..f24f6b76f53 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -210,7 +210,8 @@ static void ia64_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static pad_direction ia64_function_arg_padding (machine_mode, const_tree);
static unsigned int ia64_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static bool ia64_function_ok_for_sibcall (tree, tree);
static bool ia64_return_in_memory (const_tree, const_tree);
static rtx ia64_function_value (const_tree, const_tree, bool);
@@ -5099,7 +5100,7 @@ ia64_function_arg_advance (cumulative_args_t cum_v,
even though their normal alignment is 8 bytes. See ia64_function_arg. */
static unsigned int
-ia64_function_arg_boundary (machine_mode mode, const_tree type)
+ia64_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
if (mode == TFmode && TARGET_HPUX && TARGET_ILP32)
return PARM_BOUNDARY * 2;
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index d956518907d..df42d00acb2 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -168,7 +168,8 @@ static void iq2000_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static pad_direction iq2000_function_arg_padding (machine_mode, const_tree);
static unsigned int iq2000_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static void iq2000_va_start (tree, rtx);
static bool iq2000_legitimate_address_p (machine_mode, rtx, bool);
static bool iq2000_can_eliminate (const int, const int);
@@ -1401,7 +1402,7 @@ iq2000_function_arg_padding (machine_mode mode, const_tree type)
}
static unsigned int
-iq2000_function_arg_boundary (machine_mode mode, const_tree type)
+iq2000_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
return (type != NULL_TREE
? (TYPE_ALIGN (type) <= PARM_BOUNDARY
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 7248f9e9d68..71d1eda98ef 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -81,7 +81,7 @@ static bool m32c_pass_by_reference (cumulative_args_t,
const function_arg_info &);
static void m32c_function_arg_advance (cumulative_args_t,
const function_arg_info &);
-static unsigned int m32c_function_arg_boundary (machine_mode, const_tree);
+static unsigned int m32c_function_arg_boundary (machine_mode, const_tree, bool);
static int m32c_pushm_popm (Push_Pop_Type);
static bool m32c_strict_argument_naming (cumulative_args_t);
static rtx m32c_struct_value_rtx (tree, int);
@@ -1413,7 +1413,8 @@ m32c_function_arg_advance (cumulative_args_t ca_v,
#define TARGET_FUNCTION_ARG_BOUNDARY m32c_function_arg_boundary
static unsigned int
m32c_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
- const_tree type ATTRIBUTE_UNUSED)
+ const_tree type ATTRIBUTE_UNUSED,
+ bool)
{
return (TARGET_A16 ? 8 : 16);
}
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 36a0e34fb06..406c48f440f 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -181,7 +181,7 @@ static bool m68k_return_in_memory (const_tree, const_tree);
static void m68k_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
static void m68k_trampoline_init (rtx, tree, rtx);
static poly_int64 m68k_return_pops_args (tree, tree, poly_int64);
-static rtx m68k_delegitimize_address (rtx);
+static rtx m68k_delegitimize_address (rtx, bool);
static void m68k_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static rtx m68k_function_arg (cumulative_args_t, const function_arg_info &);
@@ -5132,7 +5132,7 @@ m68k_output_dwarf_dtprel (FILE *file, int size, rtx x)
and turn them back into a direct symbol reference. */
static rtx
-m68k_delegitimize_address (rtx orig_x)
+m68k_delegitimize_address (rtx orig_x, bool)
{
rtx x;
struct m68k_address addr;
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 9b68504f769..0a64551e943 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -137,7 +137,8 @@ static rtx mcore_function_arg (cumulative_args_t,
static void mcore_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static unsigned int mcore_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static void mcore_asm_trampoline_template (FILE *);
static void mcore_trampoline_init (rtx, tree, rtx);
static bool mcore_warn_func_return (tree);
@@ -2828,7 +2829,8 @@ mcore_function_arg_advance (cumulative_args_t cum_v,
static unsigned int
mcore_function_arg_boundary (machine_mode mode,
- const_tree type ATTRIBUTE_UNUSED)
+ const_tree type ATTRIBUTE_UNUSED,
+ bool)
{
/* Doubles must be aligned to an 8 byte boundary. */
return (mode != BLKmode && GET_MODE_SIZE (mode) == 8
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index bd56ff5b3b1..3d11da7ebdd 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1162,7 +1162,7 @@ static const struct mips_rtx_cost_data
static rtx mips_find_pic_call_symbol (rtx_insn *, rtx, bool);
static int mips_register_move_cost (machine_mode, reg_class_t,
reg_class_t);
-static unsigned int mips_function_arg_boundary (machine_mode, const_tree);
+static unsigned int mips_function_arg_boundary (machine_mode, const_tree, bool);
static rtx mips_gen_const_int_vector_shuffle (machine_mode, int);
\f
/* This hash table keeps track of implicit "mips16" and "nomips16" attributes
@@ -5922,7 +5922,7 @@ mips_get_arg_info (struct mips_arg_info *info, const CUMULATIVE_ARGS *cum,
}
/* See whether the argument has doubleword alignment. */
- doubleword_aligned_p = (mips_function_arg_boundary (mode, type)
+ doubleword_aligned_p = (mips_function_arg_boundary (mode, type, named)
> BITS_PER_WORD);
/* Set REG_OFFSET to the register count we're interested in.
@@ -6154,7 +6154,7 @@ mips_arg_partial_bytes (cumulative_args_t cum, const function_arg_info &arg)
to STACK_BOUNDARY bits if the type requires it. */
static unsigned int
-mips_function_arg_boundary (machine_mode mode, const_tree type)
+mips_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int alignment;
@@ -6780,7 +6780,7 @@ mips_std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
type = build_pointer_type (type);
align = PARM_BOUNDARY / BITS_PER_UNIT;
- boundary = targetm.calls.function_arg_boundary (TYPE_MODE (type), type);
+ boundary = targetm.calls.function_arg_boundary (TYPE_MODE (type), type, false);
/* When we align parameter on stack for caller, if the parameter
alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index ee6e722f4b2..d92caf29e73 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -2081,7 +2081,7 @@ mn10300_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x)
/* Undo pic address legitimization for the benefit of debug info. */
static rtx
-mn10300_delegitimize_address (rtx orig_x)
+mn10300_delegitimize_address (rtx orig_x, bool)
{
rtx x = orig_x, ret, addend = NULL;
bool need_mem;
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index 2b6db38a222..051a40d69ed 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -769,7 +769,7 @@ msp430_function_arg_advance (cumulative_args_t cap,
#define TARGET_FUNCTION_ARG_BOUNDARY msp430_function_arg_boundary
static unsigned int
-msp430_function_arg_boundary (machine_mode mode, const_tree type)
+msp430_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
if (mode == BLKmode
&& int_size_in_bytes (type) > 1)
@@ -836,7 +836,7 @@ msp430_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
type = build_pointer_type (type);
align = PARM_BOUNDARY / BITS_PER_UNIT;
- boundary = targetm.calls.function_arg_boundary (TYPE_MODE (type), type);
+ boundary = targetm.calls.function_arg_boundary (TYPE_MODE (type), type, false);
/* When we align parameter on stack for caller, if the parameter
alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index acf13715d83..bdb8ddb5284 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -2053,7 +2053,7 @@ nds32_function_arg_advance (cumulative_args_t ca,
}
static unsigned int
-nds32_function_arg_boundary (machine_mode mode, const_tree type)
+nds32_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
return (nds32_needs_double_word_align (mode, type)
? NDS32_DOUBLE_WORD_ALIGNMENT
@@ -2884,7 +2884,7 @@ nds32_legitimate_constant_p (machine_mode mode, rtx x)
/* Reorgnize the UNSPEC CONST and return its direct symbol. */
static rtx
-nds32_delegitimize_address (rtx x)
+nds32_delegitimize_address (rtx x, bool)
{
x = delegitimize_mem_from_attrs (x);
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index ba0a0a9ba43..f942709056d 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -2696,7 +2696,7 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
}
static rtx
-nios2_delegitimize_address (rtx x)
+nios2_delegitimize_address (rtx x, bool)
{
x = delegitimize_mem_from_attrs (x);
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 39d0275493a..ed84ea6b949 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -563,7 +563,8 @@ nvptx_function_arg_advance (cumulative_args_t cum_v, const function_arg_info &)
been promoted and/or converted to invisible reference. */
static unsigned
-nvptx_function_arg_boundary (machine_mode mode, const_tree ARG_UNUSED (type))
+nvptx_function_arg_boundary (machine_mode mode, const_tree ARG_UNUSED (type),
+ bool)
{
return GET_MODE_ALIGNMENT (mode);
}
diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c
index 5fa5425aa2b..e9a1a3bada7 100644
--- a/gcc/config/or1k/or1k.c
+++ b/gcc/config/or1k/or1k.c
@@ -852,7 +852,7 @@ or1k_legitimize_address (rtx x, rtx /* oldx */, machine_mode)
into a direct symbol reference. */
static rtx
-or1k_delegitimize_address (rtx x)
+or1k_delegitimize_address (rtx x, bool)
{
if (GET_CODE (x) == UNSPEC)
{
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 12613b39ee0..4a8b3f307f6 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -171,7 +171,7 @@ static void pa_function_arg_advance (cumulative_args_t,
const function_arg_info &);
static rtx pa_function_arg (cumulative_args_t, const function_arg_info &);
static pad_direction pa_function_arg_padding (machine_mode, const_tree);
-static unsigned int pa_function_arg_boundary (machine_mode, const_tree);
+static unsigned int pa_function_arg_boundary (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,
machine_mode,
@@ -186,7 +186,7 @@ static machine_mode pa_promote_function_mode (const_tree,
static void pa_asm_trampoline_template (FILE *);
static void pa_trampoline_init (rtx, tree, rtx);
static rtx pa_trampoline_adjust_address (rtx);
-static rtx pa_delegitimize_address (rtx);
+static rtx pa_delegitimize_address (rtx, bool);
static bool pa_print_operand_punct_valid_p (unsigned char);
static rtx pa_internal_arg_pointer (void);
static bool pa_can_eliminate (const int, const int);
@@ -9738,7 +9738,7 @@ pa_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
/* Arguments larger than one word are double word aligned. */
static unsigned int
-pa_function_arg_boundary (machine_mode mode, const_tree type)
+pa_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
bool singleword = (type
? (integer_zerop (TYPE_SIZE (type))
@@ -10334,7 +10334,7 @@ pa_trampoline_adjust_address (rtx addr)
}
static rtx
-pa_delegitimize_address (rtx orig_x)
+pa_delegitimize_address (rtx orig_x, bool)
{
rtx x = delegitimize_mem_from_attrs (orig_x);
diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
index 63b0c3877b0..db76c72becc 100644
--- a/gcc/config/riscv/riscv.c
+++ b/gcc/config/riscv/riscv.c
@@ -2454,7 +2454,7 @@ riscv_expand_conditional_move (rtx dest, rtx cons, rtx alt, rtx_code code,
to PREFERRED_STACK_BOUNDARY bits if the type requires it. */
static unsigned int
-riscv_function_arg_boundary (machine_mode mode, const_tree type)
+riscv_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int alignment;
@@ -2765,7 +2765,7 @@ riscv_get_arg_info (struct riscv_arg_info *info, const CUMULATIVE_ARGS *cum,
unsigned num_bytes, num_words;
unsigned fpr_base = return_p ? FP_RETURN : FP_ARG_FIRST;
unsigned gpr_base = return_p ? GP_RETURN : GP_ARG_FIRST;
- unsigned alignment = riscv_function_arg_boundary (mode, type);
+ unsigned alignment = riscv_function_arg_boundary (mode, type, named);
memset (info, 0, sizeof (*info));
info->gpr_offset = cum->num_gprs;
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index c512c1c1c2b..c44b4be5771 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -1767,7 +1767,8 @@ rl78_function_arg_advance (cumulative_args_t cum_v,
static unsigned int
rl78_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
- const_tree type ATTRIBUTE_UNUSED)
+ const_tree type ATTRIBUTE_UNUSED,
+ bool)
{
return 16;
}
diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index f728f02bbd0..0be8b3d27ed 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6581,7 +6581,7 @@ rs6000_function_arg_padding (machine_mode mode, const_tree type)
Quadword align large synthetic vector types. */
unsigned int
-rs6000_function_arg_boundary (machine_mode mode, const_tree type)
+rs6000_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
machine_mode elt_mode;
int n_elts;
@@ -6663,11 +6663,11 @@ rs6000_parm_offset (void)
static unsigned int
rs6000_parm_start (machine_mode mode, const_tree type,
- unsigned int nwords)
+ bool named, unsigned int nwords)
{
unsigned int align;
- align = rs6000_function_arg_boundary (mode, type) / PARM_BOUNDARY - 1;
+ align = rs6000_function_arg_boundary (mode, type, named) / PARM_BOUNDARY - 1;
return nwords + (-(rs6000_parm_offset () + nwords) & align);
}
@@ -7033,7 +7033,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
{
int n_words = rs6000_arg_size (mode, type);
int start_words = cum->words;
- int align_words = rs6000_parm_start (mode, type, start_words);
+ int align_words = rs6000_parm_start (mode, type, named, start_words);
cum->words = align_words + n_words;
@@ -7567,7 +7567,7 @@ rs6000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
}
else
{
- int align_words = rs6000_parm_start (mode, type, cum->words);
+ int align_words = rs6000_parm_start (mode, type, named, cum->words);
/* _Decimal128 must be passed in an even/odd float register pair.
This assumes that the register number is odd when fregno is odd. */
@@ -7711,7 +7711,7 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v,
if (TARGET_MACHO && rs6000_darwin64_struct_check_p (arg.mode, arg.type))
return 0;
- align_words = rs6000_parm_start (arg.mode, arg.type, cum->words);
+ align_words = rs6000_parm_start (arg.mode, arg.type, arg.named, cum->words);
if (USE_FP_FOR_ARG_P (cum, elt_mode)
&& !(TARGET_AIX && !TARGET_ELF && arg.aggregate_type_p ()))
@@ -8376,7 +8376,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
unsigned HOST_WIDE_INT align, boundary;
tree valist_tmp = get_initialized_tmp_var (valist, pre_p, NULL);
align = PARM_BOUNDARY / BITS_PER_UNIT;
- boundary = rs6000_function_arg_boundary (TYPE_MODE (type), type);
+ boundary = rs6000_function_arg_boundary (TYPE_MODE (type), type, false);
if (boundary > MAX_SUPPORTED_STACK_ALIGNMENT)
boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
boundary /= BITS_PER_UNIT;
diff --git a/gcc/config/rs6000/rs6000-internal.h b/gcc/config/rs6000/rs6000-internal.h
index 9caef013a71..d19a2115286 100644
--- a/gcc/config/rs6000/rs6000-internal.h
+++ b/gcc/config/rs6000/rs6000-internal.h
@@ -153,7 +153,7 @@ extern bool rs6000_pass_by_reference (cumulative_args_t,
extern void setup_incoming_varargs (cumulative_args_t,
const function_arg_info &, int *, int);
extern unsigned int rs6000_function_arg_boundary (machine_mode mode,
- const_tree type);
+ const_tree type, bool named);
extern bool rs6000_must_pass_in_stack (const function_arg_info &);
extern int rs6000_arg_partial_bytes (cumulative_args_t,
const function_arg_info &);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 9d29a25750b..e5daf37da2a 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -8519,7 +8519,7 @@ rs6000_real_tls_symbol_ref_p (rtx x)
and turn them back into a direct symbol reference. */
static rtx
-rs6000_delegitimize_address (rtx orig_x)
+rs6000_delegitimize_address (rtx orig_x, bool)
{
rtx x, y, offset;
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 151ad39d9f0..87c8da99f33 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -1112,7 +1112,8 @@ rx_function_arg_advance (cumulative_args_t cum,
static unsigned int
rx_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
- const_tree type ATTRIBUTE_UNUSED)
+ const_tree type ATTRIBUTE_UNUSED,
+ bool)
{
/* Older versions of the RX backend aligned all on-stack arguments
to 32-bits. The RX C ABI however says that they should be
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 3bc01708e1c..a0a8f23dee5 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -7439,7 +7439,7 @@ s390_mangle_type (const_tree type)
and turn them back into a direct symbol reference. */
static rtx
-s390_delegitimize_address (rtx orig_x)
+s390_delegitimize_address (rtx orig_x, bool)
{
rtx x, y;
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index bf6a32de71c..48b2b3d62c5 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -268,7 +268,7 @@ static reg_class_t sh_secondary_reload (bool, rtx, reg_class_t,
struct secondary_reload_info *);
static bool sh_legitimate_address_p (machine_mode, rtx, bool);
static rtx sh_legitimize_address (rtx, rtx, machine_mode);
-static rtx sh_delegitimize_address (rtx);
+static rtx sh_delegitimize_address (rtx, bool);
static bool sh_cannot_substitute_mem_equiv_p (rtx);
static bool sh_legitimize_address_displacement (rtx *, rtx *,
poly_int64, machine_mode);
@@ -9338,7 +9338,7 @@ sh_legitimize_reload_address (rtx *p, machine_mode mode, int opnum,
general assembler lossage, recognize various UNSPEC sequences
and turn them back into a direct symbol reference. */
static rtx
-sh_delegitimize_address (rtx orig_x)
+sh_delegitimize_address (rtx orig_x, bool)
{
orig_x = delegitimize_mem_from_attrs (orig_x);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2780b4243b5..98e99fc5015 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -652,7 +652,7 @@ static bool sparc_tls_referenced_p (rtx);
static rtx sparc_legitimize_tls_address (rtx);
static rtx sparc_legitimize_pic_address (rtx, rtx);
static rtx sparc_legitimize_address (rtx, rtx, machine_mode);
-static rtx sparc_delegitimize_address (rtx);
+static rtx sparc_delegitimize_address (rtx, bool);
static bool sparc_mode_dependent_address_p (const_rtx, addr_space_t);
static bool sparc_pass_by_reference (cumulative_args_t,
const function_arg_info &);
@@ -663,7 +663,8 @@ static rtx sparc_function_incoming_arg (cumulative_args_t,
const function_arg_info &);
static pad_direction sparc_function_arg_padding (machine_mode, const_tree);
static unsigned int sparc_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static int sparc_arg_partial_bytes (cumulative_args_t,
const function_arg_info &);
static bool sparc_return_in_memory (const_tree, const_tree);
@@ -5023,7 +5024,7 @@ sparc_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
/* Delegitimize an address that was legitimized by the above function. */
static rtx
-sparc_delegitimize_address (rtx x)
+sparc_delegitimize_address (rtx x, bool)
{
x = delegitimize_mem_from_attrs (x);
@@ -7527,7 +7528,7 @@ sparc_function_incoming_arg (cumulative_args_t cum,
/* For sparc64, objects requiring 16 byte alignment are passed that way. */
static unsigned int
-sparc_function_arg_boundary (machine_mode mode, const_tree type)
+sparc_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
return ((TARGET_ARCH64
&& (GET_MODE_ALIGNMENT (mode) == 128
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index 784c4b2e957..7269c19f9e0 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -201,7 +201,7 @@ tilegx_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep)
/* Implement TARGET_FUNCTION_ARG_BOUNDARY. */
static unsigned int
-tilegx_function_arg_boundary (machine_mode mode, const_tree type)
+tilegx_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int alignment;
@@ -227,7 +227,7 @@ tilegx_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
/* See whether the argument has doubleword alignment. */
doubleword_aligned_p =
- tilegx_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD;
+ tilegx_function_arg_boundary (arg.mode, arg.type, arg.named) > BITS_PER_WORD;
if (doubleword_aligned_p)
cum += cum & 1;
@@ -1372,7 +1372,7 @@ tilegx_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
/* Implement TARGET_DELEGITIMIZE_ADDRESS. */
static rtx
-tilegx_delegitimize_address (rtx x)
+tilegx_delegitimize_address (rtx x, bool)
{
x = delegitimize_mem_from_attrs (x);
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 20a39ad4d4d..6dc198dd21b 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -153,7 +153,7 @@ tilepro_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
/* Implement TARGET_FUNCTION_ARG_BOUNDARY. */
static unsigned int
-tilepro_function_arg_boundary (machine_mode mode, const_tree type)
+tilepro_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int alignment;
@@ -179,7 +179,7 @@ tilepro_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
/* See whether the argument has doubleword alignment. */
doubleword_aligned_p =
- tilepro_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD;
+ tilepro_function_arg_boundary (arg.mode, arg.type, arg.named) > BITS_PER_WORD;
if (doubleword_aligned_p)
cum += cum & 1;
@@ -207,7 +207,7 @@ tilepro_function_arg_advance (cumulative_args_t cum_v,
/* See whether the argument has doubleword alignment. */
doubleword_aligned_p =
- tilepro_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD;
+ tilepro_function_arg_boundary (arg.mode, arg.type, arg.named) > BITS_PER_WORD;
if (doubleword_aligned_p)
*cum += *cum & 1;
@@ -1136,7 +1136,7 @@ tilepro_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
/* Implement TARGET_DELEGITIMIZE_ADDRESS. */
static rtx
-tilepro_delegitimize_address (rtx x)
+tilepro_delegitimize_address (rtx x, bool)
{
x = delegitimize_mem_from_attrs (x);
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index be1eb21a0b6..24cd2043b7a 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -150,7 +150,8 @@ static rtx xtensa_function_value (const_tree, const_tree, bool);
static rtx xtensa_libcall_value (machine_mode, const_rtx);
static bool xtensa_function_value_regno_p (const unsigned int);
static unsigned int xtensa_function_arg_boundary (machine_mode,
- const_tree);
+ const_tree,
+ bool);
static void xtensa_init_builtins (void);
static tree xtensa_fold_builtin (tree, int, tree *, bool);
static rtx xtensa_expand_builtin (tree, rtx, rtx, machine_mode, int);
@@ -188,7 +189,7 @@ static bool xtensa_can_eliminate (const int from ATTRIBUTE_UNUSED,
static HOST_WIDE_INT xtensa_starting_frame_offset (void);
static unsigned HOST_WIDE_INT xtensa_asan_shadow_offset (void);
-static rtx xtensa_delegitimize_address (rtx);
+static rtx xtensa_delegitimize_address (rtx, bool);
\f
@@ -2191,7 +2192,7 @@ xtensa_function_incoming_arg (cumulative_args_t cum,
}
static unsigned int
-xtensa_function_arg_boundary (machine_mode mode, const_tree type)
+xtensa_function_arg_boundary (machine_mode mode, const_tree type, bool)
{
unsigned int alignment;
@@ -4452,12 +4453,12 @@ xtensa_asan_shadow_offset (void)
}
static rtx
-xtensa_delegitimize_address (rtx op)
+xtensa_delegitimize_address (rtx op, bool named)
{
switch (GET_CODE (op))
{
case CONST:
- return xtensa_delegitimize_address (XEXP (op, 0));
+ return xtensa_delegitimize_address (XEXP (op, 0), named);
case UNSPEC:
if (XINT (op, 1) == UNSPEC_PLT)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-28 13:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 13:32 [gcc(refs/vendors/ARM/heads/morello)] config: Fix up non-AArch64 target hooks Alex Coplan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).