diff options
author | gonzo <gonzo@FreeBSD.org> | 2015-11-01 21:59:56 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2015-11-01 21:59:56 +0000 |
commit | 3c974d824dd35fae22536bf504300458be0872f2 (patch) | |
tree | 71f17993e6c1d1296fde99e954e8842876c45217 /sys/arm | |
parent | a23a95f981ff4d4789caf8a8349c8b017b1ac351 (diff) | |
download | FreeBSD-src-3c974d824dd35fae22536bf504300458be0872f2.zip FreeBSD-src-3c974d824dd35fae22536bf504300458be0872f2.tar.gz |
Treat synchronous VFP exception just like aynchronous: as an FP exception,
not as illegal instruction
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/vfp.c | 4 | ||||
-rw-r--r-- | sys/arm/include/vfp.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index c149aaf..80a7bd0 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -179,12 +179,12 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) fpexc = fmrx(fpexc); if (fpexc & VFPEXC_EN) { /* Clear any exceptions */ - fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); + fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_DEX | VFPEXC_FP2V)); /* kill the process - we do not handle emulation */ critical_exit(); - if (fpexc & VFPEXC_EX) { + if (fpexc & (VFPEXC_EX | VFPEXC_DEX)) { /* We have an exception, signal a SIGFPE */ ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGFPE; diff --git a/sys/arm/include/vfp.h b/sys/arm/include/vfp.h index 62345ce..2b91043 100644 --- a/sys/arm/include/vfp.h +++ b/sys/arm/include/vfp.h @@ -92,6 +92,7 @@ /* VFPEXC */ #define VFPEXC_EX (0x80000000) /* exception v1 v2 */ #define VFPEXC_EN (0x40000000) /* vfp enable */ +#define VFPEXC_DEX (0x20000000) /* Synchronous exception */ #define VFPEXC_FP2V (0x10000000) /* FPINST2 valid */ #define VFPEXC_INV (0x00000080) /* Input exception */ #define VFPEXC_UFC (0x00000008) /* Underflow exception */ |