summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-05-24 16:16:53 +0000
committerAndreas Jaeger <aj@suse.de>2000-05-24 16:16:53 +0000
commitfff82885d2cfbb0617f8536cbc0805cd64b748bf (patch)
treea56ec0dbbaf0fa36398aaa56f6fceeff2473b071 /sysdeps
parenta074fa3c2b7be9d90eef33cae0d9327e877a1d77 (diff)
downloadglibc-fff82885d2cfbb0617f8536cbc0805cd64b748bf.tar.gz
glibc-fff82885d2cfbb0617f8536cbc0805cd64b748bf.tar.xz
glibc-fff82885d2cfbb0617f8536cbc0805cd64b748bf.zip
Update.
	* sysdeps/mips/elf/start.S (ENTRY_POINT): Align stack for double
	words.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mips/elf/start.S10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 7fee4e71c3..064fe7e6f4 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -27,7 +27,7 @@
    segment.  The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
    point runs, most registers' values are unspecified, except for:
 
-   v1 ($2)	Contains a function pointer to be registered with `atexit'.
+   v0 ($2)	Contains a function pointer to be registered with `atexit'.
 		This is how the dynamic linker arranges to have DT_FINI
 		functions called for shared libraries that have been loaded
 		before this code runs.
@@ -76,7 +76,9 @@ ENTRY_POINT:
 	dla $4, main		/* main */
 	lw $5, 0($29)		/* argc */
 	addu $6, $29, 4		/* argv  */
-	/* Allocate space on the stack for seven arguments but align to 32.  */
+	/* Allocate space on the stack for seven arguments and make sure
+	   the stack is aligned to double words (8 bytes).  */
+	and $29, 0xfffffff8
 	subu $29, 32
 	dla $7, _init		/* init */
 	dla $8, _fini
@@ -84,7 +86,9 @@ ENTRY_POINT:
 	la $4, main		/* main */
 	lw $5, 0($29)		/* argc */
 	addu $6, $29, 4		/* argv  */
-	/* Allocate space on the stack for seven arguments but align to 32.  */
+	/* Allocate space on the stack for seven arguments and make sure
+	   the stack is aligned to double words (8 bytes).  */
+	and $29, 0xfffffff8
 	subu $29, 32
 	la $7, _init		/* init */
 	la $8, _fini