PATCH: PR target/35657: Alignments of DFP types aren't consistent

H.J. Lu hjl.tools@gmail.com
Thu May 1 14:01:00 GMT 2008


On Wed, Apr 30, 2008 at 04:14:02PM -0700, Kreitzer, David L wrote:
> After further investigation, we observed that __m64 is implemented a bit differently than double and long long.  It is aligned to 8 bytes in structures, but only to 4 bytes in the outgoing parameter block.  This is the convention we will use for _Decimal64.
> 

This patch implements the ia32 psABI update for _Decimal64. OK for
trunk and 4.3?

Thanks.


H.J.
---
2008-05-01  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/35657
	* config/i386/i386.c (ix86_function_arg_boundary): Only align
	_Decimal128 to its natural boundary.

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 2388)
+++ config/i386/i386.c	(working copy)
@@ -4637,8 +4637,8 @@ ix86_function_arg_boundary (enum machine
     align = GET_MODE_ALIGNMENT (mode);
   if (align < PARM_BOUNDARY)
     align = PARM_BOUNDARY;
-  /* Decimal floating point is aligned to its natural boundary.  */
-  if (!TARGET_64BIT && !VALID_DFP_MODE_P (mode))
+  /* In 32bit, only _Decimal128 is aligned to its natural boundary.  */
+  if (!TARGET_64BIT && mode != TDmode)
     {
       /* i386 ABI defines all arguments to be 4 byte aligned.  We have to
 	 make an exception for SSE modes since these require 128bit



More information about the Gcc-patches mailing list