]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] fix i386 regparm=3 RT signal handlers on x86_64
authorAlbert Cahalan <acahalan@gmail.com>
Mon, 30 Oct 2006 03:26:17 +0000 (22:26 -0500)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 30 Oct 2006 20:12:21 +0000 (12:12 -0800)
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>
arch/x86_64/ia32/ia32_signal.c

index a6ba9951e86ce3d4f7a40da027b0516ed548486c..0e0a266d976fb1ee5c1b446c119b2fa2c6e34afb 100644 (file)
@@ -579,6 +579,11 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        regs->rsp = (unsigned long) frame;
        regs->rip = (unsigned long) ka->sa.sa_handler;
 
+       /* Make -mregparm=3 work */
+       regs->rax = sig;
+       regs->rdx = (unsigned long) &frame->info;
+       regs->rcx = (unsigned long) &frame->uc;
+
        asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); 
        asm volatile("movl %0,%%es" :: "r" (__USER32_DS));