blob: e98b337cea9600f30f69ade0f24cafc91183f8dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
|