aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAlexey Baturo <baturo.alexey@gmail.com>2022-07-17 13:15:43 +0300
committerAlistair Francis <alistair.francis@wdc.com>2022-09-07 09:18:32 +0200
commitdec19f68130cda6c44c4eab4ed8c185c5ed40e5a (patch)
tree3273f1e929aacd14e6f6788b2eec3c8b15577977 /target
parent780bb81bb3624b304d3226803b61e881777d183d (diff)
downloadqemu-dec19f68130cda6c44c4eab4ed8c185c5ed40e5a.zip
qemu-dec19f68130cda6c44c4eab4ed8c185c5ed40e5a.tar.gz
qemu-dec19f68130cda6c44c4eab4ed8c185c5ed40e5a.tar.bz2
target/riscv: Fix typo and restore Pointer Masking functionality for RISC-V
Fixes: 4302bef9e178 ("target/riscv: Calculate address according to XLEN") Signed-off-by: Alexey Baturo <baturo.alexey@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220717101543.478533-2-space.monkey.delivers@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target')
-rw-r--r--target/riscv/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index 6eeb728..76da8db 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -544,7 +544,7 @@ static TCGv get_address(DisasContext *ctx, int rs1, int imm)
tcg_gen_addi_tl(addr, src1, imm);
if (ctx->pm_mask_enabled) {
- tcg_gen_and_tl(addr, addr, pm_mask);
+ tcg_gen_andc_tl(addr, addr, pm_mask);
} else if (get_xl(ctx) == MXL_RV32) {
tcg_gen_ext32u_tl(addr, addr);
}