summaryrefslogtreecommitdiff
path: root/emulators/pearpc/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/pearpc/patches/patch-ac')
-rw-r--r--emulators/pearpc/patches/patch-ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/emulators/pearpc/patches/patch-ac b/emulators/pearpc/patches/patch-ac
new file mode 100644
index 00000000000..e98b337cea9
--- /dev/null
+++ b/emulators/pearpc/patches/patch-ac
@@ -0,0 +1,31 @@
+$NetBSD: patch-ac,v 1.1 2005/12/22 19:27:36 ghen Exp $
+
+--- src/cpu/cpu_generic/ppc_vec.cc.orig 2005-12-21 15:41:47.000000000 +0100
++++ src/cpu/cpu_generic/ppc_vec.cc
+@@ -2594,7 +2594,7 @@ void ppc_opc_vrfiz()
+ PPC_OPC_ASSERT(vrA==0);
+
+ for (int i=0; i<4; i++) { //FIXME: This might not comply with Java FP
+- gCPU.vr[vrD].f[i] = truncf(gCPU.vr[vrD].f[i]);
++ gCPU.vr[vrD].f[i] = rint(gCPU.vr[vrD].f[i]);
+ }
+ }
+
+@@ -2726,7 +2726,7 @@ void ppc_opc_vctsxs()
+
+ for (int i=0; i<4; i++) { //FIXME: This might not comply with Java FP
+ ftmp = gCPU.vr[vrB].f[i] * (float)(1 << uimm);
+- ftmp = truncf(ftmp);
++ ftmp = rint(ftmp);
+
+ tmp = (sint32)ftmp;
+
+@@ -2755,7 +2755,7 @@ void ppc_opc_vctuxs()
+
+ for (int i=0; i<4; i++) { //FIXME: This might not comply with Java FP
+ ftmp = gCPU.vr[vrB].f[i] * (float)(1 << uimm);
+- ftmp = truncf(ftmp);
++ ftmp = rint(ftmp);
+
+ tmp = (uint32)ftmp;
+