aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-03-19 18:08:24 +0000
committerJim Wilson <wilson@gcc.gnu.org>2018-03-19 11:08:24 -0700
commitc0d3d1b681f7847299b2e8e14c61cf903d6ee8fd (patch)
tree6c750ebf2a08f4fbadc51e44dfe2f389b7ee21bc /gcc/config
parentbe742eb4d4a3295d6e07e4c8d66a5ab54a68ef2f (diff)
downloadgcc-c0d3d1b681f7847299b2e8e14c61cf903d6ee8fd.zip
gcc-c0d3d1b681f7847299b2e8e14c61cf903d6ee8fd.tar.gz
gcc-c0d3d1b681f7847299b2e8e14c61cf903d6ee8fd.tar.bz2
RISC-V: Fix bootstrap failure.
gcc/ PR bootstrap/84856 * config/riscv/riscv.c (riscv_function_arg_boundary): Use PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY. (riscv_first_stack_step): Likewise. (riscv_option_override): Use STACK_BOUNDARY instead of MIN_STACK_BOUNDARY. * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from MIN_STACK_BOUNDARY. (BIGGEST_ALIGNMENT): Set to 128. (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY. (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY. From-SVN: r258650
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/riscv/riscv.c8
-rw-r--r--gcc/config/riscv/riscv.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
index 3e81874..9e1005e 100644
--- a/gcc/config/riscv/riscv.c
+++ b/gcc/config/riscv/riscv.c
@@ -2202,7 +2202,7 @@ riscv_expand_conditional_branch (rtx label, rtx_code code, rtx op0, rtx op1)
/* Implement TARGET_FUNCTION_ARG_BOUNDARY. Every parameter gets at
least PARM_BOUNDARY bits of alignment, but will be given anything up
- to STACK_BOUNDARY bits if the type requires it. */
+ to PREFERRED_STACK_BOUNDARY bits if the type requires it. */
static unsigned int
riscv_function_arg_boundary (machine_mode mode, const_tree type)
@@ -2215,7 +2215,7 @@ riscv_function_arg_boundary (machine_mode mode, const_tree type)
else
alignment = type ? TYPE_ALIGN (type) : GET_MODE_ALIGNMENT (mode);
- return MIN (STACK_BOUNDARY, MAX (PARM_BOUNDARY, alignment));
+ return MIN (PREFERRED_STACK_BOUNDARY, MAX (PARM_BOUNDARY, alignment));
}
/* If MODE represents an argument that can be passed or returned in
@@ -3506,7 +3506,7 @@ riscv_first_stack_step (struct riscv_frame_info *frame)
return frame->total_size;
HOST_WIDE_INT min_first_step = frame->total_size - frame->fp_sp_offset;
- HOST_WIDE_INT max_first_step = IMM_REACH / 2 - STACK_BOUNDARY / 8;
+ HOST_WIDE_INT max_first_step = IMM_REACH / 2 - PREFERRED_STACK_BOUNDARY / 8;
HOST_WIDE_INT min_second_step = frame->total_size - max_first_step;
gcc_assert (min_first_step <= max_first_step);
@@ -4142,7 +4142,7 @@ riscv_option_override (void)
riscv_stack_boundary = ABI_STACK_BOUNDARY;
if (riscv_preferred_stack_boundary_arg)
{
- int min = ctz_hwi (MIN_STACK_BOUNDARY / 8);
+ int min = ctz_hwi (STACK_BOUNDARY / 8);
int max = 8;
if (!IN_RANGE (riscv_preferred_stack_boundary_arg, min, max))
diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
index 6144e26..ebd80c0 100644
--- a/gcc/config/riscv/riscv.h
+++ b/gcc/config/riscv/riscv.h
@@ -124,13 +124,13 @@ along with GCC; see the file COPYING3. If not see
#define FUNCTION_BOUNDARY (TARGET_RVC ? 16 : 32)
/* The smallest supported stack boundary the calling convention supports. */
-#define MIN_STACK_BOUNDARY (2 * BITS_PER_WORD)
+#define STACK_BOUNDARY (2 * BITS_PER_WORD)
/* The ABI stack alignment. */
#define ABI_STACK_BOUNDARY 128
/* There is no point aligning anything to a rounder boundary than this. */
-#define BIGGEST_ALIGNMENT STACK_BOUNDARY
+#define BIGGEST_ALIGNMENT 128
/* The user-level ISA permits unaligned accesses, but they are not required
of the privileged architecture. */
@@ -482,7 +482,7 @@ enum reg_class
`crtl->outgoing_args_size'. */
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
-#define STACK_BOUNDARY riscv_stack_boundary
+#define PREFERRED_STACK_BOUNDARY riscv_stack_boundary
/* Symbolic macros for the registers used to return integer and floating
point values. */
@@ -540,7 +540,7 @@ typedef struct {
/* Align based on stack boundary, which might have been set by the user. */
#define RISCV_STACK_ALIGN(LOC) \
- (((LOC) + ((STACK_BOUNDARY/8)-1)) & -(STACK_BOUNDARY/8))
+ (((LOC) + ((PREFERRED_STACK_BOUNDARY/8)-1)) & -(PREFERRED_STACK_BOUNDARY/8))
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in