The TLB comparator is sized for the target. Use a 32-bit compare when appropriate.
Signed-off-by: Richard Henderson <r...@twiddle.net> --- tcg/s390/tcg-target.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 6101255..ec4c72a 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -174,7 +174,9 @@ typedef enum S390Opcode { RS_SRL = 0x88, RXY_AG = 0xe308, + RXY_AY = 0xe35a, RXY_CG = 0xe320, + RXY_CY = 0xe359, RXY_LB = 0xe376, RXY_LG = 0xe304, RXY_LGB = 0xe377, @@ -198,6 +200,8 @@ typedef enum S390Opcode { RXY_STRVH = 0xe33f, RXY_STY = 0xe350, + RX_A = 0x5a, + RX_C = 0x59, RX_L = 0x58, RX_LH = 0x48, RX_ST = 0x50, @@ -1442,7 +1446,11 @@ static void tcg_prepare_qemu_ldst(TCGContext* s, TCGReg data_reg, } assert(ofs < 0x80000); - tcg_out_insn(s, RXY, CG, arg0, arg1, TCG_AREG0, ofs); + if (TARGET_LONG_BITS == 32) { + tcg_out_mem(s, RX_C, RXY_CY, arg0, arg1, TCG_AREG0, ofs); + } else { + tcg_out_mem(s, 0, RXY_CG, arg0, arg1, TCG_AREG0, ofs); + } if (TARGET_LONG_BITS == 32) { tgen_ext32u(s, arg0, addr_reg); @@ -1494,7 +1502,7 @@ static void tcg_prepare_qemu_ldst(TCGContext* s, TCGReg data_reg, ofs = offsetof(CPUState, tlb_table[mem_index][0].addend); assert(ofs < 0x80000); - tcg_out_insn(s, RXY, AG, arg0, arg1, TCG_AREG0, ofs); + tcg_out_mem(s, 0, RXY_AG, arg0, arg1, TCG_AREG0, ofs); } static void tcg_finish_qemu_ldst(TCGContext* s, uint16_t *label2_ptr) -- 1.7.0.1