aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/helper.h
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-07 22:46:31 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-07 22:46:31 +0000
commitd8299bccf265b72db967a064e8151660b78cdfae (patch)
treed4333d881e01ccea7680165495345d8b05aa14e9 /target-sh4/helper.h
parent54604f74ae618aca3715cf0d8cb2ede923c0d6c0 (diff)
SH4: Implement FD bit
SH4 manual say that if a floating point instruction is executed while FD bit in the status register is 1, an exception should be raised. QEMU presently does not do that, so the kernel does not initialize FP state for any thread, nor does it save/restore FP state. The most apparent consequence is that while recent gcc/libc expect double-precision mode to be set by kernel, they run in single-precision mode, and all FP code produces wrong values. This patch fixes this. It also fixes a couple of places where PC was not updated before handling an exception, although both those places deal with invalid instruction and don't lead to any user-visible bugs. (Vladimir Prus) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5937 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/helper.h')
-rw-r--r--target-sh4/helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-sh4/helper.h b/target-sh4/helper.h
index e8fd050efe..631e7e1968 100644
--- a/target-sh4/helper.h
+++ b/target-sh4/helper.h
@@ -3,6 +3,8 @@
DEF_HELPER_0(ldtlb, void)
DEF_HELPER_0(raise_illegal_instruction, void)
DEF_HELPER_0(raise_slot_illegal_instruction, void)
+DEF_HELPER_0(raise_fpu_disable, void)
+DEF_HELPER_0(raise_slot_fpu_disable, void)
DEF_HELPER_0(debug, void)
DEF_HELPER_1(sleep, void, i32)
DEF_HELPER_1(trapa, void, i32)