Skip to content

Commit

Permalink
target/mips: fix emulation of nanoMIPS BPOSGE32 instruction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
motokultivator authored and philmd committed Jun 24, 2021
1 parent 916e957 commit e5e6f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/mips/tcg/translate.c
Expand Up @@ -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:
Expand Down

0 comments on commit e5e6f00

Please sign in to comment.