[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 6/6] target/mips: Add unaligned access support for MIPS64R6 and Lo
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 6/6] target/mips: Add unaligned access support for MIPS64R6 and Loongson-3 |
Date: |
Tue, 3 Nov 2020 18:31:27 +0100 |
From: Huacai Chen <zltjiangshi@gmail.com>
MIPSR6 (not only MIPS32R6) processors support unaligned access in
hardware, so set MO_UNALN in their default_tcg_memop_mask. Btw, new
Loongson-3 (such as Loongson-3A4000) also support unaligned access,
since both old and new Loongson-3 use the same binaries, we can simply
set MO_UNALN for all Loongson-3 processors.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1604053541-27822-3-git-send-email-chenhc@lemote.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 3197a692c45..c64a1bc42e1 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -31442,8 +31442,8 @@ static void mips_tr_init_disas_context(DisasContextBase
*dcbase, CPUState *cs)
#else
ctx->mem_idx = hflags_mmu_index(ctx->hflags);
#endif
- ctx->default_tcg_memop_mask = (ctx->insn_flags & ISA_MIPS32R6) ?
- MO_UNALN : MO_ALIGN;
+ ctx->default_tcg_memop_mask = (ctx->insn_flags & (ISA_MIPS32R6 |
ISA_MIPS64R6 |
+ INSN_LOONGSON3A)) ? MO_UNALN : MO_ALIGN;
LOG_DISAS("\ntb %p idx %d hflags %04x\n", ctx->base.tb, ctx->mem_idx,
ctx->hflags);
--
2.26.2
- [PULL 0/6] Mips fixes patches, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 1/6] hw/mips: Remove the 'r4k' machine, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 2/6] hw/mips: Fix Lesser GPL version number, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 3/6] hw/mips/boston: Fix Lesser GPL version number, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 4/6] hw/intc/loongson: Fix incorrect 'core' calculation in liointc_read/write, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 5/6] target/mips: Fix Lesser GPL version number, Philippe Mathieu-Daudé, 2020/11/03
- [PULL 6/6] target/mips: Add unaligned access support for MIPS64R6 and Loongson-3,
Philippe Mathieu-Daudé <=
- Re: [PULL 0/6] Mips fixes patches, Peter Maydell, 2020/11/04