IA-32 compatibility patch: FP denormal handling
The following patch makes ia64 compatible with i386 with respect to siginfo.si_code on FP denormal operands. This is necessary for the correct emulation of many IA-32 apps.
Please apply to both 2.4 and 2.5.
-Arun
arch/ia64/kernel/traps.c renamed from arch/ia64/kernel/traps.c.orig +4 -0
@@ -325,6 +325,10 @@ siginfo.si_addr = (void *) (regs->cr_iip +ia64_psr (regs)->ri);if (isr &0x11 ) { siginfo.si_code =FPE_FLTINV ; + }else if (isr &0x22 ) { +/* denormal operand gets the same si_code as underflow +* see arch/i386/kernel/traps.c:math_error() */ + siginfo.si_code =FPE_FLTUND ; }else if (isr &0x44 ) { siginfo.si_code =FPE_FLTDIV ; }
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Arun Sharma
Arun> The following patch makes ia64 compatible with i386 with Arun> respect to siginfo.si_code on FP denormal operands. This is Arun> necessary for the correct emulation of many IA-32 apps.
Arun> Please apply to both 2.4 and 2.5.
Looks good to me. I applied it (apologies for the garbled bk changelog entry...).
--david
Quoted 4 lines · Arun Sharma
The following patch makes ia64 compatible with i386 with respect to siginfo.si_code on FP denormal operands. This is necessary for the correct emulation of many IA-32 apps.
Please apply to both 2.4 and 2.5.
Applied for 2.4, thanks!