diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-04-03 06:14:53 +0000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-11 09:53:41 +0100 |
commit | 8b1b45971ff6a2d98d2737279fbbc4173e0dbe8c (patch) | |
tree | 81e2c0fd5a77b7753d73d8bce27935a895f084c1 /tcg/s390x | |
parent | f0f43534f7f5beb92788951da6944faad154c6a2 (diff) | |
download | qemu-8b1b45971ff6a2d98d2737279fbbc4173e0dbe8c.zip qemu-8b1b45971ff6a2d98d2737279fbbc4173e0dbe8c.tar.gz qemu-8b1b45971ff6a2d98d2737279fbbc4173e0dbe8c.tar.bz2 |
tcg/s390x: Use ALGFR in constructing softmmu host address
Rather than zero-extend the guest address into a register,
use an add instruction which zero-extends the second input.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/s390x')
-rw-r--r-- | tcg/s390x/tcg-target.c.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index dfcf4d9..dd13326 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -149,6 +149,7 @@ typedef enum S390Opcode { RRE_ALGR = 0xb90a, RRE_ALCR = 0xb998, RRE_ALCGR = 0xb988, + RRE_ALGFR = 0xb91a, RRE_CGR = 0xb920, RRE_CLGR = 0xb921, RRE_DLGR = 0xb987, @@ -1853,10 +1854,11 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, tcg_out_insn(s, RXY, LG, h->index, TCG_REG_R2, TCG_REG_NONE, offsetof(CPUTLBEntry, addend)); - h->base = addr_reg; if (TARGET_LONG_BITS == 32) { - tcg_out_ext32u(s, TCG_REG_R3, addr_reg); - h->base = TCG_REG_R3; + tcg_out_insn(s, RRE, ALGFR, h->index, addr_reg); + h->base = TCG_REG_NONE; + } else { + h->base = addr_reg; } h->disp = 0; #else |