diff mbox

[i386] : Redefine PUSH_ROUNDING using UNITS_PER_WORD

Message ID AANLkTinFuKY66fhS_SsF1Y-HogGyD_62dWu0LvBx-qkn@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Sept. 16, 2010, 6:36 a.m. UTC
... and a bit of comment rewording/reformatting.

2010-09-16  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.h (PUSH_ROUNDING): Redefine using UNITS_PER_WORD.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline.

Uros.
diff mbox

Patch

Index: i386.h
===================================================================
--- i386.h	(revision 164296)
+++ i386.h	(working copy)
@@ -1456,26 +1456,21 @@ 
    of the first local allocated.  */
 #define STARTING_FRAME_OFFSET 0
 
-/* If we generate an insn to push BYTES bytes,
-   this says how many the stack pointer really advances by.
-   On 386, we have pushw instruction that decrements by exactly 2 no
-   matter what the position was, there is no pushb.
-   But as CIE data alignment factor on this arch is -4, we need to make
-   sure all stack pointer adjustments are in multiple of 4.
+/* If we generate an insn to push BYTES bytes, this says how many the stack
+   pointer really advances by.  On 386, we have pushw instruction that
+   decrements by exactly 2 no matter what the position was, there is no pushb.
 
-   For 64bit ABI we round up to 8 bytes.
- */
+   But as CIE data alignment factor on this arch is -4 for 32bit targets
+   and -8 for 64bit targets, we need to make sure all stack pointer adjustments
+   are in multiple of 4 for 32bit targets and 8 for 64bit targets.  */
 
 #define PUSH_ROUNDING(BYTES) \
-  (TARGET_64BIT		     \
-   ? (((BYTES) + 7) & (-8))  \
-   : (((BYTES) + 3) & (-4)))
+  (((BYTES) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD)
 
-/* If defined, the maximum amount of space required for outgoing arguments will
-   be computed and placed into the variable
-   `crtl->outgoing_args_size'.  No space will be pushed onto the
-   stack for each call; instead, the function prologue should increase the stack
-   frame size by this amount.  
+/* If defined, the maximum amount of space required for outgoing arguments
+   will be computed and placed into the variable `crtl->outgoing_args_size'.
+   No space will be pushed onto the stack for each call; instead, the
+   function prologue should increase the stack frame size by this amount.  
    
    MS ABI seem to require 16 byte alignment everywhere except for function
    prologue and apilogue.  This is not possible without