summaryrefslogtreecommitdiffstats
path: root/target-i386
diff options
context:
space:
mode:
authorAurelien Jarno2012-01-07 15:20:12 +0100
committerAurelien Jarno2012-01-11 09:55:28 +0100
commit170d5b4bb9f8382bd98dde09d969d2e85d83db06 (patch)
tree9844a76f480ae860ca22c3570fdc34d3efcc8e6f /target-i386
parenttarget-i386: fix round{pd,ps,sd,ss} SSE2 instructions (diff)
downloadqemu-170d5b4bb9f8382bd98dde09d969d2e85d83db06.tar.gz
qemu-170d5b4bb9f8382bd98dde09d969d2e85d83db06.tar.xz
qemu-170d5b4bb9f8382bd98dde09d969d2e85d83db06.zip
target-i386: fix dpps and dppd SSE2 instructions
The helpers implemented dpps and dppd SSE instructions are not passing the correct argument types to the softfloat functions. While they do work anyway providing a correct behaviour, this patch fixes that. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/ops_sse.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h
index 6a77295a8b..0d33ca1985 100644
--- a/target-i386/ops_sse.h
+++ b/target-i386/ops_sse.h
@@ -1775,44 +1775,44 @@ SSE_HELPER_I(helper_pblendw, W, 8, FBLENDP)
void glue(helper_dpps, SUFFIX) (Reg *d, Reg *s, uint32_t mask)
{
- float32 iresult = 0 /*float32_zero*/;
+ float32 iresult = float32_zero;
if (mask & (1 << 4))
iresult = float32_add(iresult,
- float32_mul(d->L(0), s->L(0), &env->sse_status),
+ float32_mul(d->XMM_S(0), s->XMM_S(0), &env->sse_status),
&env->sse_status);
if (mask & (1 << 5))
iresult = float32_add(iresult,
- float32_mul(d->L(1), s->L(1), &env->sse_status),
+ float32_mul(d->XMM_S(1), s->XMM_S(1), &env->sse_status),
&env->sse_status);
if (mask & (1 << 6))
iresult = float32_add(iresult,
- float32_mul(d->L(2), s->L(2), &env->sse_status),
+ float32_mul(d->XMM_S(2), s->XMM_S(2), &env->sse_status),
&env->sse_status);
if (mask & (1 << 7))
iresult = float32_add(iresult,
- float32_mul(d->L(3), s->L(3), &env->sse_status),
+ float32_mul(d->XMM_S(3), s->XMM_S(3), &env->sse_status),
&env->sse_status);
- d->L(0) = (mask & (1 << 0)) ? iresult : 0 /*float32_zero*/;
- d->L(1) = (mask & (1 << 1)) ? iresult : 0 /*float32_zero*/;
- d->L(2) = (mask & (1 << 2)) ? iresult : 0 /*float32_zero*/;
- d->L(3) = (mask & (1 << 3)) ? iresult : 0 /*float32_zero*/;
+ d->XMM_S(0) = (mask & (1 << 0)) ? iresult : float32_zero;
+ d->XMM_S(1) = (mask & (1 << 1)) ? iresult : float32_zero;
+ d->XMM_S(2) = (mask & (1 << 2)) ? iresult : float32_zero;
+ d->XMM_S(3) = (mask & (1 << 3)) ? iresult : float32_zero;
}
void glue(helper_dppd, SUFFIX) (Reg *d, Reg *s, uint32_t mask)
{
- float64 iresult = 0 /*float64_zero*/;
+ float64 iresult = float64_zero;
if (mask & (1 << 4))
iresult = float64_add(iresult,
- float64_mul(d->Q(0), s->Q(0), &env->sse_status),
+ float64_mul(d->XMM_D(0), s->XMM_D(0), &env->sse_status),
&env->sse_status);
if (mask & (1 << 5))
iresult = float64_add(iresult,
- float64_mul(d->Q(1), s->Q(1), &env->sse_status),
+ float64_mul(d->XMM_D(1), s->XMM_D(1), &env->sse_status),
&env->sse_status);
- d->Q(0) = (mask & (1 << 0)) ? iresult : 0 /*float64_zero*/;
- d->Q(1) = (mask & (1 << 1)) ? iresult : 0 /*float64_zero*/;
+ d->XMM_D(0) = (mask & (1 << 0)) ? iresult : float64_zero;
+ d->XMM_D(1) = (mask & (1 << 1)) ? iresult : float64_zero;
}
void glue(helper_mpsadbw, SUFFIX) (Reg *d, Reg *s, uint32_t offset)