[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 08/33] tcg-ppc64: Fix setcond_i32
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v4 08/33] tcg-ppc64: Fix setcond_i32 |
Date: |
Thu, 4 Apr 2013 17:56:01 -0500 |
We weren't ignoring the high 32 bits during a NE comparison.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/ppc64/tcg-target.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index b12cbec..822eb07 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -1129,6 +1129,12 @@ static void tcg_out_setcond (TCGContext *s, TCGType
type, TCGCond cond,
tcg_out32 (s, XOR | SAB (arg1, 0, arg2));
}
+ /* Make sure and discard the high 32-bits of the input. */
+ if (type == TCG_TYPE_I32) {
+ tcg_out32(s, EXTSW | RA(TCG_REG_R0) | RS(arg));
+ arg = TCG_REG_R0;
+ }
+
if (arg == arg1 && arg1 == arg0) {
tcg_out32(s, ADDIC | TAI(0, arg, -1));
tcg_out32(s, SUBFE | TAB(arg0, 0, arg));
--
1.8.1.4
- [Qemu-devel] [PATCH v4 00/33] Modernize tcg/ppc64, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 01/33] disas: Disassemble all ppc insns for the host, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 03/33] tcg-ppc64: Introduce and use tcg_out_rlw, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 04/33] tcg-ppc64: Introduce and use tcg_out_ext32u, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 02/33] tcg-ppc64: Use TCGReg everywhere, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 06/33] tcg-ppc64: Introduce and use tcg_out_shri64, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 08/33] tcg-ppc64: Fix setcond_i32,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 05/33] tcg-ppc64: Introduce and use tcg_out_shli64, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 09/33] tcg-ppc64: Cleanup tcg_out_movi, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 10/33] tcg-ppc64: Rearrange integer constant constraints, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 07/33] tcg-ppc64: Introduce and use TAI and SAI, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 12/33] tcg-ppc64: Allow constant first argument to sub, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 13/33] tcg-ppc64: Tidy or and xor patterns., Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 14/33] tcg-ppc64: Improve and_i32 with constant, Richard Henderson, 2013/04/04
- [Qemu-devel] [PATCH v4 11/33] tcg-ppc64: Improve constant add and sub ops., Richard Henderson, 2013/04/04