aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/traps.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-24 01:02:04 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-24 01:02:04 -0400
commitb2382b363df828f25e35ed8b70a3da33b29b2a64 (patch)
tree23aa2e70ba4650390c9281b3696172313bdb0f38 /arch/i386/kernel/traps.c
parent1b5cca3a88b7682d538d129c25f0e3092613a243 (diff)
parent0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff)
Merge upstream into ieee80211.
Hand-fix merge conflict in drivers/usb/net/zd1201.c.
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r--arch/i386/kernel/traps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index a61f33d06ea3..cd2d5d5514fe 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -803,15 +803,17 @@ void math_error(void __user *eip)
803 */ 803 */
804 cwd = get_fpu_cwd(task); 804 cwd = get_fpu_cwd(task);
805 swd = get_fpu_swd(task); 805 swd = get_fpu_swd(task);
806 switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { 806 switch (swd & ~cwd & 0x3f) {
807 case 0x000: 807 case 0x000:
808 default: 808 default:
809 break; 809 break;
810 case 0x001: /* Invalid Op */ 810 case 0x001: /* Invalid Op */
811 case 0x041: /* Stack Fault */ 811 /*
812 case 0x241: /* Stack Fault | Direction */ 812 * swd & 0x240 == 0x040: Stack Underflow
813 * swd & 0x240 == 0x240: Stack Overflow
814 * User must clear the SF bit (0x40) if set
815 */
813 info.si_code = FPE_FLTINV; 816 info.si_code = FPE_FLTINV;
814 /* Should we clear the SF or let user space do it ???? */
815 break; 817 break;
816 case 0x002: /* Denormalize */ 818 case 0x002: /* Denormalize */
817 case 0x010: /* Underflow */ 819 case 0x010: /* Underflow */