diff options
author | Albert Cahalan <acahalan@gmail.com> | 2006-10-29 22:26:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-30 15:12:21 -0500 |
commit | a7aacdf9ea45bf6139cfd750e558a3dcbc6f16c3 (patch) | |
tree | f39534927b66496a07e4804c8de277d182a30ba9 /arch | |
parent | 202dd450246cd658e298a86dddca5592fcb898cd (diff) |
[PATCH] fix i386 regparm=3 RT signal handlers on x86_64
The recent change to make x86_64 support i386 binaries compiled
with -mregparm=3 only covered signal handlers without SA_SIGINFO.
(the 3-arg "real-time" ones) This is useful for klibc at least.
Signed-off-by: Albert Cahalan <acahalan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/ia32/ia32_signal.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c index a6ba9951e86c..0e0a266d976f 100644 --- a/arch/x86_64/ia32/ia32_signal.c +++ b/arch/x86_64/ia32/ia32_signal.c | |||
@@ -579,6 +579,11 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
579 | regs->rsp = (unsigned long) frame; | 579 | regs->rsp = (unsigned long) frame; |
580 | regs->rip = (unsigned long) ka->sa.sa_handler; | 580 | regs->rip = (unsigned long) ka->sa.sa_handler; |
581 | 581 | ||
582 | /* Make -mregparm=3 work */ | ||
583 | regs->rax = sig; | ||
584 | regs->rdx = (unsigned long) &frame->info; | ||
585 | regs->rcx = (unsigned long) &frame->uc; | ||
586 | |||
582 | asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); | 587 | asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); |
583 | asm volatile("movl %0,%%es" :: "r" (__USER32_DS)); | 588 | asm volatile("movl %0,%%es" :: "r" (__USER32_DS)); |
584 | 589 | ||