On 10/02/2015 06:42 PM, Uros Bizjak wrote:
Attached patch introduces ROUND_UP and ROUND_DOWN global macros.
These come handy to round and align various values, as shown by the
usage in config/i386/ files.

     * 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.

Ok. I double checked there are no other uses of ROUND_UP in the compiler (there are some in the libraries).

There are some macros like AARCH64_ROUND_UP which should probably go away as well. Preapproved as a followup.


Bernd

Reply via email to