diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-02-15 23:06:19 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-02-15 23:06:19 +0000 |
commit | 3cc6237083cd40247e060c1fcf403a2d9ccbaf92 (patch) | |
tree | ffae14fb7d2721bb246cb21a44718f39b4ca6fcf /target-ppc/op.c | |
parent | c4decf377c314c48795ddd3ead1ce3d2ea981ca0 (diff) | |
download | qemu-3cc6237083cd40247e060c1fcf403a2d9ccbaf92.zip |
ppc fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1297 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op.c')
-rw-r--r-- | target-ppc/op.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c index c6c0989ce9..5accc55064 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -697,9 +697,9 @@ PPC_OP(addzeo) PPC_OP(divw) { if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) { - Ts0 = (-1) * (T0 >> 31); + T0 = (int32_t)((-1) * (T0 >> 31)); } else { - Ts0 /= Ts1; + T0 = (Ts0 / Ts1); } RETURN(); } @@ -712,7 +712,7 @@ PPC_OP(divwo) T0 = (-1) * (T0 >> 31); } else { xer_ov = 0; - Ts0 /= Ts1; + T0 = (Ts0 / Ts1); } RETURN(); } @@ -744,7 +744,7 @@ PPC_OP(divwuo) /* multiply high word */ PPC_OP(mulhw) { - Ts0 = ((int64_t)Ts0 * (int64_t)Ts1) >> 32; + T0 = ((int64_t)Ts0 * (int64_t)Ts1) >> 32; RETURN(); } @@ -758,7 +758,7 @@ PPC_OP(mulhwu) /* multiply low immediate */ PPC_OP(mulli) { - Ts0 *= SPARAM(1); + T0 = (Ts0 * SPARAM(1)); RETURN(); } @@ -779,7 +779,7 @@ PPC_OP(mullwo) } else { xer_ov = 0; } - Ts0 = res; + T0 = (int32_t)res; RETURN(); } @@ -787,7 +787,7 @@ PPC_OP(mullwo) PPC_OP(neg) { if (T0 != 0x80000000) { - Ts0 = -Ts0; + T0 = -Ts0; } RETURN(); } @@ -799,7 +799,7 @@ PPC_OP(nego) xer_so = 1; } else { xer_ov = 0; - Ts0 = -Ts0; + T0 = -Ts0; } RETURN(); } @@ -1047,14 +1047,14 @@ PPC_OP(eqv) /* extend sign byte */ PPC_OP(extsb) { - Ts0 = (int8_t)(Ts0); + T0 = (int32_t)((int8_t)(Ts0)); RETURN(); } /* extend sign half word */ PPC_OP(extsh) { - Ts0 = (int16_t)(Ts0); + T0 = (int32_t)((int16_t)(Ts0)); RETURN(); } @@ -1175,8 +1175,8 @@ PPC_OP(sraw) /* shift right algebraic word immediate */ PPC_OP(srawi) { - Ts1 = Ts0; - Ts0 = Ts0 >> PARAM(1); + T1 = T0; + T0 = (Ts0 >> PARAM(1)); if (Ts1 < 0 && (Ts1 & PARAM(2)) != 0) { xer_ca = 1; } else { @@ -1207,7 +1207,7 @@ PPC_OP(fadd) /* fadds - fadds. */ PPC_OP(fadds) { - FTS0 += FTS1; + FT0 = FTS0 + FTS1; RETURN(); } @@ -1221,7 +1221,7 @@ PPC_OP(fsub) /* fsubs - fsubs. */ PPC_OP(fsubs) { - FTS0 -= FTS1; + FT0 = FTS0 - FTS1; RETURN(); } @@ -1235,7 +1235,7 @@ PPC_OP(fmul) /* fmuls - fmuls. */ PPC_OP(fmuls) { - FTS0 *= FTS1; + FT0 = FTS0 * FTS1; RETURN(); } @@ -1249,7 +1249,7 @@ PPC_OP(fdiv) /* fdivs - fdivs. */ PPC_OP(fdivs) { - FTS0 /= FTS1; + FT0 = FTS0 / FTS1; RETURN(); } @@ -1299,7 +1299,7 @@ PPC_OP(fmadd) /* fmadds - fmadds. */ PPC_OP(fmadds) { - FTS0 = (FTS0 * FTS1) + FTS2; + FT0 = (FTS0 * FTS1) + FTS2; RETURN(); } @@ -1313,7 +1313,7 @@ PPC_OP(fmsub) /* fmsubs - fmsubs. */ PPC_OP(fmsubs) { - FTS0 = (FTS0 * FTS1) - FTS2; + FT0 = (FTS0 * FTS1) - FTS2; RETURN(); } @@ -1349,7 +1349,7 @@ PPC_OP(fnmsubs) /* frsp - frsp. */ PPC_OP(frsp) { - FTS0 = FT0; + FT0 = (float)FT0; RETURN(); } |