summaryrefslogtreecommitdiff
path: root/gcc/ggc-page.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2015-10-02 20:08:59 +0200
committerUros Bizjak <uros@gcc.gnu.org>2015-10-02 20:08:59 +0200
commit54070b515503af0361d0d03851fd0082b2a8258e (patch)
tree630acfab2e4be97054b80106ff14ee5ae153ed14 /gcc/ggc-page.c
parent1c7485afda66c17e00d3dcdce2ef9bf9106d3cda (diff)
system.h (ROUND_UP): New macro definition.
* system.h (ROUND_UP): New macro definition. (ROUND_DOWN): Ditto. * ggc-page.c (ROUND_UP): Remove local macro definition. (PAGE_ALIGN): Implement using ROUND_UP macro. * config/i386/i386.h (PUSH_ROUNDING): Implement using ROUND_UP macro. * config/i386/i386.c (function_arg_advance_64): Use ROUND_UP macro to align values. (ix86_compute_frame_layout): Ditto. (ix86_expand_prologue): Ditto. (ix86_adjust_stack_and_probe): Use ROUND_DOWN macro to round down values. (expand_set_or_movmem_via_rep): Ditto. From-SVN: r228410
Diffstat (limited to 'gcc/ggc-page.c')
-rw-r--r--gcc/ggc-page.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 58f19c0d24e..34e9e243deb 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -216,13 +216,9 @@ static const size_t extra_order_size_table[] = {
#define ROUND_UP_VALUE(x, f) ((f) - 1 - ((f) - 1 + (x)) % (f))
-/* Compute the smallest multiple of F that is >= X. */
-
-#define ROUND_UP(x, f) (CEIL (x, f) * (f))
-
/* Round X to next multiple of the page size */
-#define PAGE_ALIGN(x) (((x) + G.pagesize - 1) & ~(G.pagesize - 1))
+#define PAGE_ALIGN(x) ROUND_UP ((x), G.pagesize)
/* The Ith entry is the number of objects on a page or order I. */