OSDN Git Service

target/mips: Fix emulation of nanoMIPS BNEC[32] instruction
authorDragan Mladjenovic <dragan.mladjenovic@syrmia.com>
Wed, 4 May 2022 11:04:00 +0000 (13:04 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 11 Jun 2022 09:35:48 +0000 (11:35 +0200)
commit14668cfaaf4d6f818d9e6b58dd44b75842654e2a
treee5bec46f33323072f5aa23628d3839e66105bf3d
parent5de4359b4f303faf5eecc7c37668a6bef77cb656
target/mips: Fix emulation of nanoMIPS BNEC[32] instruction

If both rs and rt are the same register, the nanoMIPS instruction
BNEC[32] rs, rt, address is equivalent to NOP (branch is not taken and
there is no delay slot). This commit provides such behavior. Without
this commit, this scenario results in an incorrect behavior.

Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>
Signed-off-by: Stefan Pejic <stefan.pejic@syrmia.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220504110403.613168-5-stefan.pejic@syrmia.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
target/mips/tcg/nanomips_translate.c.inc