From 83f89aef4a45788e03e74c1cebe212190682a099 Mon Sep 17 00:00:00 2001 From: Chuck Ebbert <76306.1226@compuserve.com> Date: Mon, 12 Sep 2005 18:49:25 +0200 Subject: [PATCH] --- yaml --- r: 8632 b: refs/heads/master c: ff347b221512a83e7b08356729e3e2c14346e29e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/traps.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1c12e7edf4b9..01fb1e0236f2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 847815760cc0f41985b3185d780aa4369fcb475d +refs/heads/master: ff347b221512a83e7b08356729e3e2c14346e29e diff --git a/trunk/arch/x86_64/kernel/traps.c b/trunk/arch/x86_64/kernel/traps.c index 64a59cb49411..77658f7f4e84 100644 --- a/trunk/arch/x86_64/kernel/traps.c +++ b/trunk/arch/x86_64/kernel/traps.c @@ -795,13 +795,16 @@ asmlinkage void do_coprocessor_error(struct pt_regs *regs) */ cwd = get_fpu_cwd(task); swd = get_fpu_swd(task); - switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { + switch (swd & ~cwd & 0x3f) { case 0x000: default: break; case 0x001: /* Invalid Op */ - case 0x041: /* Stack Fault */ - case 0x241: /* Stack Fault | Direction */ + /* + * swd & 0x240 == 0x040: Stack Underflow + * swd & 0x240 == 0x240: Stack Overflow + * User must clear the SF bit (0x40) if set + */ info.si_code = FPE_FLTINV; break; case 0x002: /* Denormalize */