This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR libc/12872: Wrong alignment of La_x86_64_vector


Hi,

We need to align La_x86_64_vector to 32byte. Otherwise, any access
to ymm field may cause unaligned access.  This patch aligns
La_x86_64_vector to 32byte.  It won't change layout of La_x86_64_regs.
But it will change layout of La_x86_64_retval.

H.J.
---
2011-06-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR libc/12872
	* sysdeps/x86_64/bits/link.h (La_x86_64_vector): Aligned to
	32byte.

diff --git a/sysdeps/x86_64/bits/link.h b/sysdeps/x86_64/bits/link.h
index 643a293..3dcd886 100644
--- a/sysdeps/x86_64/bits/link.h
+++ b/sysdeps/x86_64/bits/link.h
@@ -76,7 +76,7 @@ typedef union
   La_x86_64_ymm ymm[2];
 # endif
   La_x86_64_xmm xmm[4];
-} La_x86_64_vector __attribute__ ((aligned(16)));
+} La_x86_64_vector __attribute__ ((aligned(32)));
 
 typedef struct La_x86_64_regs
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]