* [Qemu-devel] [6006] target-ppc: use accessors to access fp_status exception_flags
@ 2008-12-13 12:13 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-12-13 12:13 UTC (permalink / raw)
To: qemu-devel
Revision: 6006
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6006
Author: aurel32
Date: 2008-12-13 12:13:33 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
target-ppc: use accessors to access fp_status exception_flags
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-ppc/op_helper.c
Modified: trunk/target-ppc/op_helper.c
===================================================================
--- trunk/target-ppc/op_helper.c 2008-12-13 11:49:17 UTC (rev 6005)
+++ trunk/target-ppc/op_helper.c 2008-12-13 12:13:33 UTC (rev 6006)
@@ -1000,12 +1000,15 @@
/* 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 @@
#ifdef CONFIG_SOFTFLOAT
void helper_reset_fpstatus (void)
{
- env->fp_status.float_exception_flags = 0;
+ set_float_exception_flags(0, &env->fp_status);
}
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-13 12:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-13 12:13 [Qemu-devel] [6006] target-ppc: use accessors to access fp_status exception_flags Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).