about summary refs log tree commit diff
path: root/sysdeps/unix/mips/sysdep.S
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-03-17 15:47:13 +0000
committerAlexandre Oliva <aoliva@redhat.com>2003-03-17 15:47:13 +0000
commit4947b4b20f49324647a7cbcd2596b1f5b4639748 (patch)
tree0447ee1cce55994f03a92ba7413268c51be85d11 /sysdeps/unix/mips/sysdep.S
parentde4471dd559ab27a8927135fb5a475eaa613c437 (diff)
downloadglibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.tar.gz
glibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.tar.xz
glibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.zip
* sysdeps/mips/bits/wordsize.h: New file, appropriate for all 3 ABIs. * sysdeps/mips/mips64/gmp-mparam.h: New file. Define BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs. * sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros. (__sigsetjmp_aux): Use them. Adjust for all 3 ABIs. * sysdeps/mips/elf/start.S: Adjust for all 3 ABIs. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. * sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for 64-bit types.
2003-03-17  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/mips/bits/wordsize.h: New file, appropriate for all
	3 ABIs.
	* sysdeps/mips/mips64/gmp-mparam.h: New file.  Define
	BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs.
	* sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros.
	(__sigsetjmp_aux): Use them.  Adjust for all 3 ABIs.
	* sysdeps/mips/elf/start.S: Adjust for all 3 ABIs.
	* sysdeps/unix/mips/brk.S: Likewise.
	* sysdeps/unix/mips/sysdep.S: Likewise.
	* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
	* sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise.
	* sysdeps/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
	* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
	* sysdeps/mips/mips64/bsd-setjmp.S: Likewise.
	* sysdeps/mips/mips64/setjmp.S: Likewise.
	* sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete.
	* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for
	64-bit types.
Diffstat (limited to 'sysdeps/unix/mips/sysdep.S')
-rw-r--r--sysdeps/unix/mips/sysdep.S52
1 files changed, 26 insertions, 26 deletions
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index a1adf677f9..09e8a0ac7a 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -24,24 +24,27 @@
 
 #ifdef _LIBC_REENTRANT
 
+LOCALSZ= 3
+FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
+RAOFF= FRAMESZ-(1*SZREG)
+GPOFF= FRAMESZ-(2*SZREG)
+V0OFF= FRAMESZ-(3*SZREG)
+	
 ENTRY(__syscall_error)
 #ifdef __PIC__
-	.set noreorder
-	.set	noat
-	move	AT, ra
-	bltzal	zero, 0f
-	nop
-0:	.cpload	ra
-	move	ra, AT
-	.set	at
-	.set	reorder
+	.set noat
+	SETUP_GPX (AT)
+	.set at
 #endif
-	subu	sp, 32
+	PTR_SUBU sp, FRAMESZ
+	.set noat
+	SETUP_GPX64(GPOFF,AT)
+	.set at
 #ifdef __PIC__
-	.cprestore 16
+	SAVE_GP(GPOFF)
 #endif
-	sw	v0, 20(sp)
-	sw	ra, 24(sp)
+	REG_S	v0, V0OFF(sp)
+	REG_S	ra, RAOFF(sp)
 
 #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
 	/* We translate the system's EWOULDBLOCK error into EAGAIN.
@@ -56,12 +59,13 @@ L(skip):
 	jal	__errno_location
 
 	/* Store the error value.  */
-	lw	t0, 20(sp)
-	sw	t0, 0(v0)
+	REG_L	t4, V0OFF(sp)
+	sw	t4, 0(v0)
 
 	/* And just kick back a -1.  */
-	lw	ra, 24(sp)
-	addiu	sp, 32
+	REG_L	ra, RAOFF(sp)
+	RESTORE_GP64
+	PTR_ADDU sp, FRAMESZ
 	li	v0, -1
 	j	ra
 	END(__syscall_error)
@@ -71,16 +75,10 @@ L(skip):
 
 ENTRY(__syscall_error)
 #ifdef __PIC__
-	.set	noreorder
-	.set	noat
-	move	AT, ra
-	bltzal	zero, 0f
-	nop
-0:	.cpload	ra
-	move	ra, AT
-	.set	at
-	.set	reorder
+	SETUP_GPX (AT)
 #endif
+	SETUP_GPX64 (t9, AT)
+	
 #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
 	/* We translate the system's EWOULDBLOCK error into EAGAIN.
 	   The GNU C library always defines EWOULDBLOCK==EAGAIN.
@@ -94,6 +92,8 @@ L(skip):
 
 	/* And just kick back a -1.  */
 	li v0, -1
+
+	RESTORE_GP64
 	j ra
 	END(__syscall_error)
 #endif  /* _LIBC_REENTRANT  */