1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Prefix stubs with __syscall_, move nop inside, adjust users by +4.

2004-01-15  Richard Henderson  <rth@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Prefix stubs with
	__syscall_, move nop inside, adjust users by +4.
This commit is contained in:
Richard Henderson
2004-01-16 04:59:55 +00:00
parent 5ef6ae4bdb
commit 23e50ece45
2 changed files with 30 additions and 29 deletions

View File

@ -1,3 +1,8 @@
2004-01-15 Richard Henderson <rth@redhat.com>
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Prefix stubs with
__syscall_, move nop inside, adjust users by +4.
2004-01-14 Steven Munroe <sjmunroe@us.ibm.com> 2004-01-14 Steven Munroe <sjmunroe@us.ibm.com>
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME] * include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]

View File

@ -26,7 +26,6 @@
This just about halves signal delivery time. */ This just about halves signal delivery time. */
#ifdef __NR_rt_sigaction
.text .text
ENTRY(__syscall_rt_sigaction) ENTRY(__syscall_rt_sigaction)
@ -42,12 +41,20 @@ ENTRY(__syscall_rt_sigaction)
beq a1, 0f beq a1, 0f
ldl t0, 8(a1) # sa_flags ldl t0, 8(a1) # sa_flags
ldah a4, sigreturn(gp) !gprelhigh
ldah t1, rt_sigreturn(gp) !gprelhigh /* The unwinder will subtract one from the return address when
lda a4, sigreturn(a4) !gprellow attempting to find the call instruction that led us here.
lda t1, rt_sigreturn(t1) !gprellow Since we didn't get here via a normal call, if we do nothing
and t0, 0x00000040, t0 # SA_SIGINFO we would pick up the wrong symbol and the wrong FDE. Account
for this by adding a nop to the start of the function and
then skipping it here by adding 4. */
ldah a4, __syscall_sigreturn+4(gp) !gprelhigh
ldah t1, __syscall_rt_sigreturn+4(gp) !gprelhigh
lda a4, __syscall_sigreturn+4(a4) !gprellow
lda t1, __syscall_rt_sigreturn+4(t1) !gprellow
and t0, 0x40, t0 # SA_SIGINFO
cmovne t0, t1, a4 cmovne t0, t1, a4
0: ldi v0, __NR_rt_sigaction 0: ldi v0, __NR_rt_sigaction
callsys callsys
bne a3, SYSCALL_ERROR_LABEL bne a3, SYSCALL_ERROR_LABEL
@ -57,10 +64,10 @@ PSEUDO_END(__syscall_rt_sigaction)
/* To enable unwinding through the signal frame without special hackery /* To enable unwinding through the signal frame without special hackery
elsewhere, describe the entire struct sigcontext with unwind info. elsewhere, describe the entire struct sigcontext with unwind info.
Note that we begin the unwind info one instruction before the start
of the function; the unwinder will subtract one from the return address In order to minimize the size of the encoding, we set the CFA to the
attempting to find the call instruction that led us here, since we end of the sigcontext, which makes all of the registers have small
didn't get here via a normal call. */ negative offsets from that. */
.macro SIGCONTEXT_REGS_I base, from=0 .macro SIGCONTEXT_REGS_I base, from=0
cfi_offset (\from, \base + (4 + \from) * 8) cfi_offset (\from, \base + (4 + \from) * 8)
@ -91,34 +98,23 @@ PSEUDO_END(__syscall_rt_sigaction)
cfi_startproc cfi_startproc
cfi_return_column (64) cfi_return_column (64)
SIGCONTEXT_REGS -648 SIGCONTEXT_REGS -648
cfi_def_cfa_offset (648) cfi_def_cfa_offset (648)
__syscall_sigreturn:
nop nop
sigreturn:
mov sp, a0 mov sp, a0
ldi v0, __NR_sigreturn ldi v0, __NR_sigreturn
callsys callsys
cfi_endproc .size __syscall_sigreturn, .-__syscall_sigreturn
.size sigreturn, .-sigreturn .type __syscall_sigreturn, @function
.type sigreturn, @function
cfi_startproc
cfi_return_column (64)
SIGCONTEXT_REGS -648
cfi_def_cfa_offset (176 + 648) cfi_def_cfa_offset (176 + 648)
__syscall_rt_sigreturn:
nop nop
rt_sigreturn:
mov sp,a0 mov sp,a0
ldi v0,__NR_rt_sigreturn ldi v0,__NR_rt_sigreturn
callsys callsys
cfi_endproc .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn
.size rt_sigreturn, .-rt_sigreturn .type __syscall_rt_sigreturn, @function
.type rt_sigreturn, @function
#else cfi_endproc
ENTRY(__syscall_rt_sigaction)
ldgp $29,0($27)
.prologue 1
ldi $0,ENOSYS
SYSCALL_ERROR_HANDLER
END(__syscall_rt_sigaction)
#endif