Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>

* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
 	sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S,
 	sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
 	sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
 	sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
 	sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
 	sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
 	sysdeps/unix/sysv/linux/alpha/pipe.S,
 	sysdeps/unix/sysv/linux/sigsuspend.S,
 	sysdeps/unix/sysv/linux/alpha/syscall.S,
 	sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
  	sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
 	framesize declaration.  Replace "lda pv,sym/jsr pv" by "jsr sym".
This commit is contained in:
Roland McGrath 1996-05-23 05:32:12 +00:00
parent d964e72133
commit 24c177a079
15 changed files with 73 additions and 95 deletions

View File

@ -34,18 +34,15 @@ holds the return address of the function's caller (selfpc and frompc,
respectively in gmon.c language...). */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
# include <regdef.h>
#endif
#undef ret /* discard `ret' as defined in sysdep.h */
.set noat
.set noreorder
ENTRY(_mcount)
LEAF(_mcount, 0xb0)
.prologue 0
subq sp, 0xb0, sp
stq a0, 0x00(sp)
mov ra, a0 # a0 = caller-pc

View File

@ -24,11 +24,6 @@ caller-saved (call-used) registers (except for argument registers
a1-a5). */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
# include <regdef.h>
#endif
/*
* These offsets should match with "struct bb" declared in gcc/libgcc2.c.
@ -40,12 +35,19 @@ a1-a5). */
.set noreorder
ENTRY(__bb_init_func)
.prologue 0
ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */
beq t0, init /* not initialized yet -> */
ret
.end __bb_init_func
init: subq sp, 0x38, sp
LEAF(init, 0x38)
subq sp, 0x38, sp
.prologue 0
stq pv, 0x30(sp)
br pv, 1f
1: ldgp gp, 0(pv)
@ -81,5 +83,5 @@ init: subq sp, 0x38, sp
leave: ldq pv, 0x30(sp)
addq sp, 0x38, sp
ret
.end __bb_init_func
.end init

View File

@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY (setjmp)
lda $27, __sigsetjmp /* Load address to jump to. */
bis $31, 1, $17 /* Pass a second argument of one. */
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
ENTRY(setjmp)
lda $27, __sigsetjmp /* Load address to jump to. */
bis $31, 1, $17 /* Pass a second argument of one. */
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
.end setjmp

View File

@ -22,11 +22,6 @@ Cambridge, MA 02139, USA. */
architecture. */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
#include <regdef.h>
#endif
.set noreorder
.set noat

View File

@ -17,22 +17,18 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
#include <regdef.h>
#endif
ENTRY(__htonl)
extlh a0,5,t1 # t1 = dd000000
zap a0,0xfd,t2 # t2 = 0000cc00
sll t2,5,t2 # t2 = 00198000
s8addl t2,t1,t1 # t1 = ddcc0000
zap a0,0xfb,t2 # t2 = 00bb0000
srl t2,8,t2 # t2 = 0000bb00
extbl a0,3,v0 # v0 = 000000aa
or t1,v0,v0 # v0 = ddcc00aa
or t2,v0,v0 # v0 = ddccbbaa
.prologue 0
extlh a0, 5, t1 # t1 = dd000000
zap a0, 0xfd, t2 # t2 = 0000cc00
sll t2, 5, t2 # t2 = 00198000
s8addl t2, t1, t1 # t1 = ddcc0000
zap a0, 0xfb, t2 # t2 = 00bb0000
srl t2, 8, t2 # t2 = 0000bb00
extbl a0, 3, v0 # v0 = 000000aa
or t1, v0, v0 # v0 = ddcc00aa
or t2, v0, v0 # v0 = ddccbbaa
ret
.end __htonl

View File

@ -17,16 +17,12 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
#include <regdef.h>
#endif
ENTRY(__htons)
extwh a0,7,t1 # t1 = bb00
extbl a0,1,v0 # v0 = 00aa
bis v0,t1,v0 # v0 = bbaa
.prologue 0
extwh a0, 7, t1 # t1 = bb00
extbl a0, 1, v0 # v0 = 00aa
bis v0, t1, v0 # v0 = bbaa
ret
.end __htons

View File

@ -35,16 +35,13 @@ For correctness consider that:
*/
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
#include <regdef.h>
#endif
.set noreorder
.set noat
ENTRY(memchr)
.prologue 0
beq a2, not_found
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
addq a0, a2, t4

View File

@ -29,11 +29,6 @@ architecture:
binary search needs). */
#include <sysdep.h>
#ifdef __linux__
# include <alpha/regdef.h>
#else
#include <regdef.h>
#endif
.set noreorder
.set noat

View File

@ -19,15 +19,15 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
#include <sysdep.h>
.set noreorder
.set noat
.text
.align 3
.globl __udiv_qrnnd
.ent __udiv_qrnnd
__udiv_qrnnd:
.frame $30,0,$26,0
.text
LEAF(__udiv_qrnnd, 0)
.prologue 0
#define cnt $2
#define tmp $3

View File

@ -36,24 +36,23 @@ __curbrk:
.quad _end
.text
ENTRY(__brk)
LEAF(__brk, 0)
ldgp gp, 0(t12)
.prologue 1
ldi v0, __NR_brk
call_pal PAL_callsys
subq a0, v0, t0
bne t0, error
bne t0, error
/* Update __curbrk and return cleanly. */
stl a0, __curbrk
mov zero, v0
stl a0, __curbrk
mov zero, v0
ret
/* What a horrible way to die. */
error: ldi v0, ENOMEM
lda pv, syscall_error
jmp zero,(pv)
jmp zero, syscall_error
.end __brk

View File

@ -21,9 +21,10 @@ Cambridge, MA 02139, USA. */
#define GSI_IEEE_FP_CONTROL 45
.text
ENTRY(__ieee_get_fp_control)
LEAF(__ieee_get_fp_control, 8)
lda sp, -8(sp)
.prologue 1
.prologue 0
mov sp, a1
ldi a0, GSI_IEEE_FP_CONTROL
@ -36,8 +37,9 @@ ENTRY(__ieee_get_fp_control)
ret
error: lda sp, 8(sp)
lda pv, syscall_error
jmp zero,(pv)
br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
.end __ieee_get_fp_control

View File

@ -20,10 +20,9 @@ Cambridge, MA 02139, USA. */
#define SSI_IEEE_FP_CONTROL 14
.text
ENTRY(__ieee_set_fp_control)
LEAF(__ieee_set_fp_control, 8)
lda sp, -8(sp)
.prologue 1
.prologue 0
stq a0, 0(sp)
mov sp, a1
@ -36,8 +35,9 @@ ENTRY(__ieee_set_fp_control)
bne a3, error
ret
error: lda pv, syscall_error
jmp zero,(pv)
error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
.end __ieee_set_fp_control

View File

@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
.text
ENTRY(__pipe)
LEAF(__pipe, 0)
.prologue 0
ldi v0, __NR_pipe
@ -35,8 +35,7 @@ ENTRY(__pipe)
error: br gp, 1f
1: ldgp gp, 0(gp)
lda pv, syscall_error
jmp zero, (pv)
jmp zero, syscall_error
.end __pipe

View File

@ -41,21 +41,20 @@ Cambridge, MA 02139, USA. */
*/
1: br gp,2f
2: ldgp gp,0(gp)
jmp zero,syscall_error
ENTRY (__syscall)
bis a0,a0,v0 # Syscall number -> v0
bis a1,a1,a0 # arg1-arg5 -> a0-a4
bis a2,a2,a1
bis a3,a3,a2
bis a4,a4,a3
bis a5,a5,a4
LEAF(__syscall, 0)
bis a0, a0, v0 # Syscall number -> v0
bis a1, a1, a0 # arg1-arg5 -> a0-a4
bis a2, a2, a1
bis a3, a3, a2
bis a4, a4, a3
bis a5, a5, a4
call_pal PAL_callsys # Invoke system call
bne a3,1b
bne a3, error
ret
error: br gp, 2f
2: ldgp gp, 0(gp)
jmp zero, syscall_error
weak_alias(__syscall, syscall)

View File

@ -20,11 +20,12 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H
#include <errnos.h>
ENTRY(syscall_error)
LEAF(syscall_error, 0)
.prologue 1
/* Store return value in errno... */
ldgp gp, 0(t12)
lda t0, errno
stl v0, 0(t0)
stl v0, errno
/* And just kick back a -1. */
ldi v0, -1