diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2015-10-02 20:08:59 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2015-10-02 20:08:59 +0200 |
commit | 54070b515503af0361d0d03851fd0082b2a8258e (patch) | |
tree | 630acfab2e4be97054b80106ff14ee5ae153ed14 /gcc/system.h | |
parent | 1c7485afda66c17e00d3dcdce2ef9bf9106d3cda (diff) | |
download | gcc-54070b515503af0361d0d03851fd0082b2a8258e.zip gcc-54070b515503af0361d0d03851fd0082b2a8258e.tar.gz gcc-54070b515503af0361d0d03851fd0082b2a8258e.tar.bz2 |
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/system.h')
-rw-r--r-- | gcc/system.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index 85a66a5..f1694b9 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -369,6 +369,12 @@ extern int errno; /* Returns the least number N such that N * Y >= X. */ #define CEIL(x,y) (((x) + (y) - 1) / (y)) +/* This macro rounds x up to the y boundary. */ +#define ROUND_UP(x,y) (((x) + (y) - 1) & ~((y) - 1)) + +/* This macro rounds x down to the y boundary. */ +#define ROUND_DOWN(x,y) ((x) & ~((y) - 1)) + #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #endif |