aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-13 12:13:33 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-13 12:13:33 +0000
commitbe94c952e4a695bf112a7745c9851ea4d7ddd756 (patch)
tree8f6b4853787af4dc0b30ad2142dd58d0ce1fd14e /target-ppc
parentd9957a8b0f3b25c0b13fa28f9e5ff285a97e672d (diff)
target-ppc: use accessors to access fp_status exception_flags
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6006 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/op_helper.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index d76ec0a4ef..20496497f1 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -1000,12 +1000,15 @@ void helper_float_check_status (void)
/* Differred floating-point exception after target FPR update */
if (msr_fe0 != 0 || msr_fe1 != 0)
helper_raise_exception_err(env->exception_index, env->error_code);
- } else if (env->fp_status.float_exception_flags & float_flag_overflow) {
- float_overflow_excp();
- } else if (env->fp_status.float_exception_flags & float_flag_underflow) {
- float_underflow_excp();
- } else if (env->fp_status.float_exception_flags & float_flag_inexact) {
- float_inexact_excp();
+ } else {
+ int status = get_float_exception_flags(&env->fp_status);
+ if (status & float_flag_overflow) {
+ float_overflow_excp();
+ } else if (status & float_flag_underflow) {
+ float_underflow_excp();
+ } else if (status & float_flag_inexact) {
+ float_inexact_excp();
+ }
}
#else
if (env->exception_index == POWERPC_EXCP_PROGRAM &&
@@ -1020,7 +1023,7 @@ void helper_float_check_status (void)
#ifdef CONFIG_SOFTFLOAT
void helper_reset_fpstatus (void)
{
- env->fp_status.float_exception_flags = 0;
+ set_float_exception_flags(0, &env->fp_status);
}
#endif