summaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sparc.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-01 00:22:26 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-01 00:22:26 +0000
commitb9b20827fbe084a50514c31a8c0fbf3322e41a30 (patch)
treeaf6b8491e6031953830d47c152177d95f2822fcd /gcc/config/sparc/sparc.c
parent3643e742bda2db5fabb13e885d18cefb0fc5d6fb (diff)
downloadgcc-b9b20827fbe084a50514c31a8c0fbf3322e41a30.tar.gz
PR target/69706
* config/sparc/sparc.c (NWORDS_UP): Rename to... (CEIL_NWORDS): ...this. Use CEIL macro. (compute_fp_layout): Adjust to above renaming. (function_arg_union_value): Likewise. (sparc_arg_partial_bytes): Likewise. (sparc_function_arg_advance): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc/sparc.c')
-rw-r--r--gcc/config/sparc/sparc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index d077680048c..080be617a5a 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -6086,7 +6086,7 @@ conventions. */
/* Maximum number of fp regs for args. */
#define SPARC_FP_ARG_MAX 16
/* Number of words (partially) occupied for a given size in units. */
-#define NWORDS_UP(SIZE) (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
+#define CEIL_NWORDS(SIZE) CEIL((SIZE), UNITS_PER_WORD)
/* Handle the INIT_CUMULATIVE_ARGS macro.
Initialize a variable CUM of type CUMULATIVE_ARGS
@@ -6429,7 +6429,7 @@ compute_fp_layout (const_tree field, HOST_WIDE_INT bitpos,
else
nregs = 1;
- nslots = NWORDS_UP (nregs * GET_MODE_SIZE (mode));
+ nslots = CEIL_NWORDS (nregs * GET_MODE_SIZE (mode));
if (nslots > SPARC_FP_ARG_MAX - this_slotno)
{
@@ -6661,7 +6661,7 @@ static rtx
function_arg_union_value (int size, machine_mode mode, int slotno,
int regno)
{
- int nwords = NWORDS_UP (size), i;
+ int nwords = CEIL_NWORDS (size), i;
rtx regs;
/* See comment in previous function for empty structures. */
@@ -6893,8 +6893,8 @@ sparc_arg_partial_bytes (cumulative_args_t cum, machine_mode mode,
if (TARGET_ARCH32)
{
if ((slotno + (mode == BLKmode
- ? NWORDS_UP (int_size_in_bytes (type))
- : NWORDS_UP (GET_MODE_SIZE (mode))))
+ ? CEIL_NWORDS (int_size_in_bytes (type))
+ : CEIL_NWORDS (GET_MODE_SIZE (mode))))
> SPARC_INT_ARG_MAX)
return (SPARC_INT_ARG_MAX - slotno) * UNITS_PER_WORD;
}
@@ -7004,8 +7004,8 @@ sparc_function_arg_advance (cumulative_args_t cum_v, machine_mode mode,
if (TARGET_ARCH32)
cum->words += (mode == BLKmode
- ? NWORDS_UP (int_size_in_bytes (type))
- : NWORDS_UP (GET_MODE_SIZE (mode)));
+ ? CEIL_NWORDS (int_size_in_bytes (type))
+ : CEIL_NWORDS (GET_MODE_SIZE (mode)));
else
{
if (type && AGGREGATE_TYPE_P (type))
@@ -7021,8 +7021,8 @@ sparc_function_arg_advance (cumulative_args_t cum_v, machine_mode mode,
}
else
cum->words += (mode == BLKmode
- ? NWORDS_UP (int_size_in_bytes (type))
- : NWORDS_UP (GET_MODE_SIZE (mode)));
+ ? CEIL_NWORDS (int_size_in_bytes (type))
+ : CEIL_NWORDS (GET_MODE_SIZE (mode)));
}
}