This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

align stack to 16 bytes for SSE on i386



We should align the stack to a 16-byte boundary for SSE.

Ok to commit?

Andreas

2001-02-03  Andreas Jaeger  <aj@suse.de>

	* sysdeps/i386/elf/start.S (_start): Align stack to 16-byte
	boundary for SSE/SSE-2 alignment.

============================================================
Index: sysdeps/i386/elf/start.S
--- sysdeps/i386/elf/start.S	2000/06/13 07:27:21	1.13
+++ sysdeps/i386/elf/start.S	2001/02/03 19:26:18
@@ -51,10 +51,11 @@
 	popl %esi		/* Pop the argument count.  */
 	movl %esp, %ecx		/* argv starts just at the current stack top.*/
 
-	/* Before pushing the arguments align the stack to a double word
-	   boundary to avoid penalties from misaligned accesses.  Thanks
-	   to Edward Seidl <seidl@janed.com> for pointing this out.  */
-	andl $0xfffffff8, %esp
+	/* Before pushing the arguments align the stack to a 16-byte
+	(SSE needs 16-byte alignment) boundary to avoid penalties from
+	misaligned accesses.  Thanks to Edward Seidl <seidl@janed.com>
+	for pointing this out.  */
+	andl $0xfffffff0, %esp
 	pushl %eax		/* Push garbage because we allocate
 				   28 more bytes.  */
 

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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