[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/15] target/mips: fix emulation of nanoMIPS BPOSGE32 instruction
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 11/15] target/mips: fix emulation of nanoMIPS BPOSGE32 instruction |
Date: |
Fri, 25 Jun 2021 11:23:25 +0200 |
From: Aleksandar Rikalo <Aleksandar.Rikalo@syrmia.com>
Per the "MIPS® Architecture Extension: nanoMIPS32 DSP Technical
Reference Manual — Revision 0.04" p. 88 "BPOSGE32C", offset argument (imm)
should be left-shifted first.
This change was tested against test_dsp_r1_bposge32.c DSP test.
Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Signed-off-by: Filip Vidojevic <filip.vidojevic@syrmia.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id:
<VI1PR0302MB34869449EE56F226FC3C21129C309@VI1PR0302MB3486.eurprd03.prod.outlook.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/tcg/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 1ff0b098bca..d248b5e5d21 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -21137,7 +21137,7 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *env,
DisasContext *ctx)
extract32(ctx->opcode, 0, 1) << 13;
gen_compute_branch_nm(ctx, OPC_BPOSGE32, 4, -1, -2,
- imm);
+ imm << 1);
}
break;
default:
--
2.31.1
- [PULL 01/15] target/mips: Fix potential integer overflow (CID 1452921), (continued)
- [PULL 01/15] target/mips: Fix potential integer overflow (CID 1452921), Philippe Mathieu-Daudé, 2021/06/25
- [PULL 02/15] target/mips: Fix TCG temporary leaks in gen_pool32a5_nanomips_insn(), Philippe Mathieu-Daudé, 2021/06/25
- [PULL 03/15] target/mips: Fix more TCG temporary leaks in gen_pool32a5_nanomips_insn, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 04/15] target/mips: Raise exception when DINSV opcode used with DSP disabled, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 05/15] target/mips: Do not abort on invalid instruction, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 06/15] target/mips: Move TCG trace events to tcg/ sub directory, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 07/15] target/mips: Move translate.h to tcg/ sub directory, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 08/15] target/mips: Restrict some system specific declarations to sysemu, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 09/15] target/mips: Remove SmartMIPS / MDMX unuseful comments, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 10/15] target/mips: Remove microMIPS BPOSGE32 / BPOSGE64 unuseful cases, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 11/15] target/mips: fix emulation of nanoMIPS BPOSGE32 instruction,
Philippe Mathieu-Daudé <=
- [PULL 12/15] target/mips: Constify host_to_mips_errno[], Philippe Mathieu-Daudé, 2021/06/25
- [PULL 13/15] target/mips: Optimize regnames[] arrays, Philippe Mathieu-Daudé, 2021/06/25
- [PULL 14/15] target/mips: Remove pointless gen_msa(), Philippe Mathieu-Daudé, 2021/06/25
- [PULL 15/15] target/mips: Merge msa32/msa64 decodetree definitions, Philippe Mathieu-Daudé, 2021/06/25
- Re: [PULL 00/15] MIPS patches for 2021-06-25, Peter Maydell, 2021/06/28