Message ID | 1E58A03D-3CD1-495E-840E-9DB7574F3638@suse.de |
---|---|
State | New |
Headers | show |
On 2013-03-25 06:19, Alexander Graf wrote: > This is because lgfi leaves the register negative, but iihl doesn't replace the upper 16 bits, only [48..32]. > > The patch below fixes it for me, but I'm sure you can come up with something cleaner, better and working on non-ext-imm machines :). Oops, yes. I've posted a patch that addresses the problem for real. r~
diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index e12a152..6b72ff4 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -775,13 +775,7 @@ static void tcg_out_movi(TCGContext *s, TCGType type, /* Insert data into the high 32-bits. */ uval = uval >> 31 >> 1; if (facilities & FACILITY_EXT_IMM) { - if (uval < 0x10000) { - tcg_out_insn(s, RI, IIHL, ret, uval); - } else if ((uval & 0xffff) == 0) { - tcg_out_insn(s, RI, IIHH, ret, uval >> 16); - } else { - tcg_out_insn(s, RIL, IIHF, ret, uval); - } + tcg_out_insn(s, RIL, IIHF, ret, uval); } else { if (uval & 0xffff) { tcg_out_insn(s, RI, IIHL, ret, uval);