public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* IA-32 compatibility patch: FP denormal handling
@ 2003-08-20 20:39 Arun Sharma
  2003-08-21  5:09 ` David Mosberger
  2003-08-26 20:25 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Arun Sharma @ 2003-08-20 20:39 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]


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



[-- Attachment #2: fp-denormal.patch --]
[-- Type: text/plain, Size: 519 bytes --]

--- linux/arch/ia64/kernel/traps.c.orig	Fri Apr 20 19:08:01 2001
+++ linux/arch/ia64/kernel/traps.c	Thu Jul  5 13:36:53 2001
@@ -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;
 			}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-26 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-20 20:39 IA-32 compatibility patch: FP denormal handling Arun Sharma
2003-08-21  5:09 ` David Mosberger
2003-08-26 20:25 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox