* [Qemu-devel] [6047] target-ppc: fix fload_invalid_op_excp()
@ 2008-12-15 17:13 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-12-15 17:13 UTC (permalink / raw)
To: qemu-devel
Revision: 6047
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6047
Author: aurel32
Date: 2008-12-15 17:13:55 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
target-ppc: fix fload_invalid_op_excp()
The argument is a value, not a flag. Update the tests accordingly. Also
set a correct default value for NaN.
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-15 17:13:48 UTC (rev 6046)
+++ trunk/target-ppc/op_helper.c 2008-12-15 17:13:55 UTC (rev 6047)
@@ -671,15 +671,13 @@
int ve;
ve = fpscr_ve;
- if (op & POWERPC_EXCP_FP_VXSNAN) {
- /* Operation on signaling NaN */
+ switch (op) {
+ case POWERPC_EXCP_FP_VXSNAN:
env->fpscr |= 1 << FPSCR_VXSNAN;
- }
- if (op & POWERPC_EXCP_FP_VXSOFT) {
- /* Software-defined condition */
+ break;
+ case POWERPC_EXCP_FP_VXSOFT:
env->fpscr |= 1 << FPSCR_VXSOFT;
- }
- switch (op & ~(POWERPC_EXCP_FP_VXSOFT | POWERPC_EXCP_FP_VXSNAN)) {
+ break;
case POWERPC_EXCP_FP_VXISI:
/* Magnitude subtraction of infinities */
env->fpscr |= 1 << FPSCR_VXISI;
@@ -718,7 +716,7 @@
env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));
if (ve == 0) {
/* Set the result to quiet NaN */
- ret = UINT64_MAX;
+ ret = 0xFFF8000000000000ULL;
env->fpscr &= ~(0xF << FPSCR_FPCC);
env->fpscr |= 0x11 << FPSCR_FPCC;
}
@@ -729,7 +727,7 @@
env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));
if (ve == 0) {
/* Set the result to quiet NaN */
- ret = UINT64_MAX;
+ ret = 0xFFF8000000000000ULL;
env->fpscr &= ~(0xF << FPSCR_FPCC);
env->fpscr |= 0x11 << FPSCR_FPCC;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-15 17:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-15 17:13 [Qemu-devel] [6047] target-ppc: fix fload_invalid_op_excp() 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).