From: Arun Sharma <adsharma@unix-os.sc.intel.com>
To: linux-ia64@vger.kernel.org
Subject: IA-32 compatibility patch: FP denormal handling
Date: Wed, 20 Aug 2003 20:39:51 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106141205114677@msgid-missing> (raw)
[-- 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;
}
next reply other threads:[~2003-08-20 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-20 20:39 Arun Sharma [this message]
2003-08-21 5:09 ` IA-32 compatibility patch: FP denormal handling David Mosberger
2003-08-26 20:25 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-106141205114677@msgid-missing \
--to=adsharma@unix-os.sc.intel.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.