From: "dragan.mladjenovic" <[email protected]>
Unlike float, the _Float32 value is passed w/o promotion when used as
varargs parameter. On N32/64, the callee side expects it to be at offset
0 inside of 8-byte slot, which matches float behavior when passed on
stack as named argument. Because of this, we need to make sure that
_Float32 value resides in upper 32 bits on big-endian when passed in
register as varargs parameter.
In order to accomplish this, the BLOCK_REG_PADDING macro is extended
with parameter NAMED whose value can be interpreted as follows
1: request for padding of known named argument
0: request for padding of known unnamed argument
-1: request for padding in unknown context
gcc/
* calls.cc: Extend the BLOCK_REG_PADDING macro appropriately.
* config/aarch64/aarch64-protos.h (aarch64_pad_reg_upward):
Update the prototype.
* config/aarch64/aarch64.cc: Extend the BLOCK_REG_PADDING macro
appropriately.
(aarch64_pad_reg_upward): Add the parameter named.
* config/aarch64/aarch64.h (BLOCK_REG_PADDING): Extend the macro
with the parameter NAMED.
* config/arm/arm-protos.h (arm_pad_reg_upward): Update
the prototype.
* config/arm/arm.cc (arm_pad_reg_upward): Add the parameter
named.
* config/arm/arm.h (BLOCK_REG_PADDING): Extend the macro with
the parameter NAMED.
* config/c6x/c6x-protos.h (c6x_block_reg_pad_upward): Update the
prototype.
* config/c6x/c6x.cc (c6x_block_reg_pad_upward): Add the
parameter named.
* config/c6x/c6x.h: (BLOCK_REG_PADDING): Extend the macro with
the parameter NAMED.
* config/mips/mips-protos.h (mips_pad_reg_upward): Update the
prototype.
* config/mips/mips.cc (mips_pad_reg_upward): Add the parameter
named. Return true for _Float32 value when passed as varags
register parameter on big-endian NEWABI targets.
* config/mips/mips.h (BLOCK_REG_PADDING): Extend the macro with
the parameter NAMED.
* config/pa/pa.h: Likewise.
* config/rs6000/aix.h: Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/freebsd64.h: Likewise.
* config/rs6000/linux64.h: Likewise.
* expr.cc: Extend the BLOCK_REG_PADDING macro appropriately.
* function.cc: Likewise.
Cherry-picked e8414cb48566bf5db33d24c6310d9558cd3b3fc0
from https://github.com/MIPS/gcc
Signed-off-by: Dragan Mladjenovic <[email protected]>
Signed-off-by: Faraz Shahbazker <[email protected]>
Signed-off-by: Aleksandar Rakic <[email protected]>
Signed-off-by: Radosav Krunic <[email protected]>
---
gcc/calls.cc | 7 ++++---
gcc/config/aarch64/aarch64-protos.h | 2 +-
gcc/config/aarch64/aarch64.cc | 8 ++++----
gcc/config/aarch64/aarch64.h | 5 +++--
gcc/config/arm/arm-protos.h | 2 +-
gcc/config/arm/arm.cc | 5 +++--
gcc/config/arm/arm.h | 4 ++--
gcc/config/c6x/c6x-protos.h | 2 +-
gcc/config/c6x/c6x.cc | 5 +++--
gcc/config/c6x/c6x.h | 5 +++--
gcc/config/mips/mips-protos.h | 2 +-
gcc/config/mips/mips.cc | 16 ++++++++++++----
gcc/config/mips/mips.h | 4 ++--
gcc/config/pa/pa.h | 2 +-
gcc/config/rs6000/aix.h | 2 +-
gcc/config/rs6000/darwin.h | 2 +-
gcc/config/rs6000/freebsd64.h | 2 +-
gcc/config/rs6000/linux64.h | 2 +-
gcc/expr.cc | 4 ++--
gcc/function.cc | 10 +++++-----
20 files changed, 52 insertions(+), 39 deletions(-)
diff --git a/gcc/calls.cc b/gcc/calls.cc
index e5d67b6c97a..dac4a3fcb5b 100644
--- a/gcc/calls.cc
+++ b/gcc/calls.cc
@@ -1231,7 +1231,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data
*args, int num_actuals)
if (bytes < UNITS_PER_WORD
#ifdef BLOCK_REG_PADDING
&& (BLOCK_REG_PADDING (args[i].mode,
- TREE_TYPE (args[i].tree_value), 1)
+ TREE_TYPE (args[i].tree_value), 1, -1)
== PAD_DOWNWARD)
#else
&& BYTES_BIG_ENDIAN
@@ -1606,7 +1606,8 @@ initialize_argument_information (int num_actuals
ATTRIBUTE_UNUSED,
end it should be padded. */
args[i].locate.where_pad =
BLOCK_REG_PADDING (arg.mode, type,
- int_size_in_bytes (type) <= UNITS_PER_WORD);
+ int_size_in_bytes (type) <= UNITS_PER_WORD,
+ argpos < n_named_args);
#endif
/* Update ARGS_SIZE, the total stack space for args so far. */
@@ -4474,7 +4475,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx
value,
argvec[count].locate.where_pad =
BLOCK_REG_PADDING (arg.mode, NULL_TREE,
known_le (GET_MODE_SIZE (arg.mode),
- UNITS_PER_WORD));
+ UNITS_PER_WORD), 1);
#endif
targetm.calls.function_arg_advance (args_so_far, arg);
diff --git a/gcc/config/aarch64/aarch64-protos.h
b/gcc/config/aarch64/aarch64-protos.h
index 0852c0391a7..00d8fbb0a2e 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -957,7 +957,7 @@ const char *aarch64_output_simd_mov_imm_low (rtx *);
char *aarch64_output_sve_mov_immediate (rtx);
char *aarch64_output_sve_ptrues (rtx);
bool aarch64_const_vec_fmov_p (rtx);
-bool aarch64_pad_reg_upward (machine_mode, const_tree, bool);
+bool aarch64_pad_reg_upward (machine_mode, const_tree, bool, int);
bool aarch64_regno_ok_for_base_p (int, bool);
bool aarch64_regno_ok_for_index_p (int, bool);
bool aarch64_reinterpret_float_as_int (rtx value, unsigned HOST_WIDE_INT
*fail);
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index a1f91dd425e..112730e25d8 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -8425,7 +8425,7 @@ aarch64_function_arg_padding (machine_mode mode,
const_tree type)
return PAD_UPWARD;
}
-/* Similarly, for use by BLOCK_REG_PADDING (MODE, TYPE, FIRST).
+/* Similarly, for use by BLOCK_REG_PADDING (MODE, TYPE, FIRST, NAMED).
It specifies padding for the last (may also be the only)
element of a block move between registers and memory. If
@@ -8449,7 +8449,7 @@ aarch64_function_arg_padding (machine_mode mode,
const_tree type)
bool
aarch64_pad_reg_upward (machine_mode mode, const_tree type,
- bool first ATTRIBUTE_UNUSED)
+ bool first ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
{
/* Aside from pure scalable types, small composite types are always
@@ -22878,7 +22878,7 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type,
gimple_seq *pre_p,
if (BYTES_BIG_ENDIAN && ag_size < UNITS_PER_VREG)
adjust = UNITS_PER_VREG - ag_size;
}
- else if (BLOCK_REG_PADDING (mode, type, 1) == PAD_DOWNWARD
+ else if (BLOCK_REG_PADDING (mode, type, 1, 0) == PAD_DOWNWARD
&& size < UNITS_PER_VREG)
{
adjust = UNITS_PER_VREG - size;
@@ -22918,7 +22918,7 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type,
gimple_seq *pre_p,
dw_align = true;
}
- if (BLOCK_REG_PADDING (mode, type, 1) == PAD_DOWNWARD
+ if (BLOCK_REG_PADDING (mode, type, 1, 0) == PAD_DOWNWARD
&& size < UNITS_PER_WORD)
{
adjust = UNITS_PER_WORD - size;
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 26db4958a80..97a80c01408 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -1302,8 +1302,9 @@ typedef struct
} CUMULATIVE_ARGS;
#endif
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
- (aarch64_pad_reg_upward (MODE, TYPE, FIRST) ? PAD_UPWARD : PAD_DOWNWARD)
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
+ (aarch64_pad_reg_upward (MODE, TYPE, FIRST, NAMED) \
+ ? PAD_UPWARD : PAD_DOWNWARD)
#define PAD_VARARGS_DOWN 0
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index b607cdb3fcc..dcee34ee2d9 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -205,7 +205,7 @@ extern bool arm_ldrd_legitimate_address (rtx);
#if defined TREE_CODE
extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
-extern bool arm_pad_reg_upward (machine_mode, tree, int);
+extern bool arm_pad_reg_upward (machine_mode, tree, int, int);
#endif
extern int arm_apply_result_size (void);
extern opt_machine_mode arm_get_mask_mode (machine_mode mode);
diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 0bc66abe238..15182d5dc01 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -17152,14 +17152,15 @@ arm_function_arg_padding (machine_mode mode,
const_tree type)
}
-/* Similarly, for use by BLOCK_REG_PADDING (MODE, TYPE, FIRST).
+/* Similarly, for use by BLOCK_REG_PADDING (MODE, TYPE, FIRST, NAMED).
Return !BYTES_BIG_ENDIAN if the least significant byte of the
register has useful data, and return the opposite if the most
significant byte does. */
bool
arm_pad_reg_upward (machine_mode mode,
- tree type, int first ATTRIBUTE_UNUSED)
+ tree type, int first ATTRIBUTE_UNUSED,
+ int named ATTRIBUTE_UNUSED)
{
if (TARGET_AAPCS_BASED && BYTES_BIG_ENDIAN)
{
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 10786ec914d..6520826faf2 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1660,8 +1660,8 @@ typedef struct
} CUMULATIVE_ARGS;
#endif
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
- (arm_pad_reg_upward (MODE, TYPE, FIRST) ? PAD_UPWARD : PAD_DOWNWARD)
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
+ (arm_pad_reg_upward (MODE, TYPE, FIRST, NAMED) ? PAD_UPWARD : PAD_DOWNWARD)
/* For AAPCS, padding should never be below the argument. For other ABIs,
* mimic the default. */
diff --git a/gcc/config/c6x/c6x-protos.h b/gcc/config/c6x/c6x-protos.h
index b6aec4a3741..3212f9d5e4f 100644
--- a/gcc/config/c6x/c6x-protos.h
+++ b/gcc/config/c6x/c6x-protos.h
@@ -25,7 +25,7 @@
#ifdef RTX_CODE
extern void c6x_init_cumulative_args (CUMULATIVE_ARGS *, const_tree, rtx, int);
-extern bool c6x_block_reg_pad_upward (machine_mode, const_tree, bool);
+extern bool c6x_block_reg_pad_upward (machine_mode, const_tree, bool, int);
extern bool c6x_legitimate_address_p_1 (machine_mode, rtx, bool, bool);
extern bool c6x_mem_operand (rtx, enum reg_class, bool);
diff --git a/gcc/config/c6x/c6x.cc b/gcc/config/c6x/c6x.cc
index 09d0e920c64..648a7484dad 100644
--- a/gcc/config/c6x/c6x.cc
+++ b/gcc/config/c6x/c6x.cc
@@ -535,12 +535,13 @@ c6x_function_arg_advance (cumulative_args_t cum_v, const
function_arg_info &)
}
-/* Return true if BLOCK_REG_PADDING (MODE, TYPE, FIRST) should return
+/* Return true if BLOCK_REG_PADDING (MODE, TYPE, FIRST, NAMED) should return
upward rather than downward. */
bool
c6x_block_reg_pad_upward (machine_mode mode ATTRIBUTE_UNUSED,
- const_tree type, bool first)
+ const_tree type, bool first,
+ int named ATTRIBUTE_UNUSED)
{
HOST_WIDE_INT size;
diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h
index b5f8ee4b12e..ad5e33c9b18 100644
--- a/gcc/config/c6x/c6x.h
+++ b/gcc/config/c6x/c6x.h
@@ -333,8 +333,9 @@ struct c6x_args {
#define INIT_CUMULATIVE_ARGS(cum, fntype, libname, fndecl, n_named_args) \
c6x_init_cumulative_args (&cum, fntype, libname, n_named_args)
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
- (c6x_block_reg_pad_upward (MODE, TYPE, FIRST) ? PAD_UPWARD : PAD_DOWNWARD)
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
+ (c6x_block_reg_pad_upward (MODE, TYPE, FIRST, NAMED) \
+ ? PAD_UPWARD : PAD_DOWNWARD)
#define FUNCTION_ARG_REGNO_P(r) \
(((r) >= REG_A4 && (r) <= REG_A13) || ((r) >= REG_B4 && (r) <= REG_B13))
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 472baac8fde..10d6261c23f 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -246,7 +246,7 @@ extern bool mips_expand_block_move (rtx, rtx, rtx);
extern void mips_expand_synci_loop (rtx, rtx);
extern void mips_init_cumulative_args (CUMULATIVE_ARGS *, tree);
-extern bool mips_pad_reg_upward (machine_mode, tree);
+extern bool mips_pad_reg_upward (machine_mode, tree, int, int);
extern bool mips_expand_ext_as_unaligned_load (rtx, rtx, HOST_WIDE_INT,
HOST_WIDE_INT, bool);
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index b6b025dacf1..36d0fa7e28c 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -6558,13 +6558,21 @@ mips_function_arg_padding (machine_mode mode,
const_tree type)
return PAD_DOWNWARD;
}
-/* Likewise BLOCK_REG_PADDING (MODE, TYPE, ...). Return !BYTES_BIG_ENDIAN
- if the least significant byte of the register has useful data. Return
- the opposite if the most significant byte does. */
+/* Likewise BLOCK_REG_PADDING (MODE, TYPE, FIRST, NAMED). Return
+ !BYTES_BIG_ENDIAN if the least significant byte of the register
+ has useful data. Return the opposite if the most significant
+ byte does. */
bool
-mips_pad_reg_upward (machine_mode mode, tree type)
+mips_pad_reg_upward (machine_mode mode, tree type, int first ATTRIBUTE_UNUSED,
+ int named)
{
+ /* The _Float32 value has to be shifted into upper 32 bits when passed
+ as varags register parameter on big-endian NEWABI targets. */
+ if (TARGET_NEWABI && TARGET_BIG_ENDIAN && named == 0 && mode == SFmode
+ && type != 0 && FLOAT_TYPE_P (type))
+ return true;
+
/* No shifting is required for floating-point arguments. */
if (type != 0 ? FLOAT_TYPE_P (type) : GET_MODE_CLASS (mode) == MODE_FLOAT)
return !BYTES_BIG_ENDIAN;
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 36115e1c9e3..e301a58c128 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2576,8 +2576,8 @@ typedef struct mips_args {
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
mips_init_cumulative_args (&CUM, FNTYPE)
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
- (mips_pad_reg_upward (MODE, TYPE) ? PAD_UPWARD : PAD_DOWNWARD)
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
+ (mips_pad_reg_upward (MODE, TYPE, FIRST, NAMED) ? PAD_UPWARD : PAD_DOWNWARD)
/* True if using EABI and varargs can be passed in floating-point
registers. Under these conditions, we need a more complex form
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index f2fda4140ee..42780750444 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -657,7 +657,7 @@ struct hppa_args {int words, nargs_prototype, incoming,
indirect; };
We use a DImode register in the parallel for 5 to 7 byte structures
so that there is only one element. This allows the object to be
correctly padded. */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
targetm.calls.function_arg_padding ((MODE), (TYPE))
diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h
index 1752a4c7eec..65fbe8b2a91 100644
--- a/gcc/config/rs6000/aix.h
+++ b/gcc/config/rs6000/aix.h
@@ -250,7 +250,7 @@
/* Specify padding for the last element of a block move between
registers and memory. FIRST is nonzero if this is the only
element. */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
(!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
/* Indicate that jump tables go in the text section. */
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 175b6b1c3e0..6376711caaf 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -441,7 +441,7 @@
/* Specify padding for the last element of a block move between
registers and memory. FIRST is nonzero if this is the only
element. */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
(!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
#define DOUBLE_INT_ASM_OP "\t.quad\t"
diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h
index ce3f9ec9079..2fc3c8deb24 100644
--- a/gcc/config/rs6000/freebsd64.h
+++ b/gcc/config/rs6000/freebsd64.h
@@ -172,7 +172,7 @@ extern int dot_symbols;
/* Specify padding for the last element of a block move between
registers and memory. FIRST is nonzero if this is the only
element. */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
(!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
/* FreeBSD doesn't support saving and restoring 64-bit regs with a 32-bit
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 1af71030368..98918589fa6 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -255,7 +255,7 @@ extern int dot_symbols;
/* Specify padding for the last element of a block move between
registers and memory. FIRST is nonzero if this is the only
element. */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST, NAMED) \
(!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
diff --git a/gcc/expr.cc b/gcc/expr.cc
index f42aab21272..fa9620be346 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -3023,7 +3023,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree
type,
extract_bit_field loads to the lsb of the reg. */
if (
#ifdef BLOCK_REG_PADDING
- BLOCK_REG_PADDING (GET_MODE (orig_src), type, i == start)
+ BLOCK_REG_PADDING (GET_MODE (orig_src), type, i == start, -1)
== (BYTES_BIG_ENDIAN ? PAD_UPWARD : PAD_DOWNWARD)
#else
BYTES_BIG_ENDIAN
@@ -3460,7 +3460,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type
ATTRIBUTE_UNUSED,
Move the fragment to the lsb if it's not already there. */
if (
#ifdef BLOCK_REG_PADDING
- BLOCK_REG_PADDING (GET_MODE (orig_dst), type, i == start)
+ BLOCK_REG_PADDING (GET_MODE (orig_dst), type, i == start, -1)
== (BYTES_BIG_ENDIAN ? PAD_UPWARD : PAD_DOWNWARD)
#else
BYTES_BIG_ENDIAN
diff --git a/gcc/function.cc b/gcc/function.cc
index 2f3c6355e5e..c57892374bc 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -2884,7 +2884,7 @@ assign_parm_setup_block_p (struct assign_parm_data_one
*data)
that are padded at the least significant end. */
if (REG_P (data->entry_parm)
&& known_lt (GET_MODE_SIZE (data->arg.mode), UNITS_PER_WORD)
- && (BLOCK_REG_PADDING (data->passed_mode, data->arg.type, 1)
+ && (BLOCK_REG_PADDING (data->passed_mode, data->arg.type, 1, 1)
== (BYTES_BIG_ENDIAN ? PAD_UPWARD : PAD_DOWNWARD)))
return true;
#endif
@@ -3019,7 +3019,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
if (mode != BLKmode
#ifdef BLOCK_REG_PADDING
&& (size == UNITS_PER_WORD
- || (BLOCK_REG_PADDING (mode, data->arg.type, 1)
+ || (BLOCK_REG_PADDING (mode, data->arg.type, 1, 1)
!= (BYTES_BIG_ENDIAN ? PAD_UPWARD : PAD_DOWNWARD)))
#endif
)
@@ -3068,7 +3068,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
additional changes to work correctly. */
gcc_checking_assert (BYTES_BIG_ENDIAN
&& (BLOCK_REG_PADDING (mode,
- data->arg.type, 1)
+ data->arg.type, 1, 1)
== PAD_UPWARD));
int by = (UNITS_PER_WORD - size) * BITS_PER_UNIT;
@@ -3089,7 +3089,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
handle all cases (e.g. SIZE == 3). */
else if (size != UNITS_PER_WORD
#ifdef BLOCK_REG_PADDING
- && (BLOCK_REG_PADDING (mode, data->arg.type, 1)
+ && (BLOCK_REG_PADDING (mode, data->arg.type, 1, 1)
== PAD_DOWNWARD)
#else
&& BYTES_BIG_ENDIAN
@@ -3113,7 +3113,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
gcc_checking_assert (size > UNITS_PER_WORD);
#ifdef BLOCK_REG_PADDING
gcc_checking_assert (BLOCK_REG_PADDING (GET_MODE (mem),
- data->arg.type, 0)
+ data->arg.type, 0, 1)
== PAD_UPWARD);
#endif
emit_move_insn (mem, entry_parm);
--
2.43.0