From ba39cb4fcb12d84c684d99bdbcb2fb22ddb06d0b Mon Sep 17 00:00:00 2001 From: Heiher Date: Thu, 1 Mar 2018 09:02:29 -0500 Subject: [PATCH] target-mips: Fix Loongson pandn instruction. pandn FD, FS, FT Operation: FD = ((NOT FS) AND FT) Backports commit 9099a36b4bb81f84004b77f08e58ac2c67eed0e7 from qemu --- qemu/target-mips/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu/target-mips/translate.c b/qemu/target-mips/translate.c index 56c6b9a5..1cf89cec 100644 --- a/qemu/target-mips/translate.c +++ b/qemu/target-mips/translate.c @@ -4002,9 +4002,12 @@ static void gen_loongson_multimedia(DisasContext *ctx, int rd, int rs, int rt) LMI_DIRECT(XOR_CP2, xor, xor); LMI_DIRECT(NOR_CP2, nor, nor); LMI_DIRECT(AND_CP2, and, and); - LMI_DIRECT(PANDN, pandn, andc); LMI_DIRECT(OR, or, or); + case OPC_PANDN: + tcg_gen_andc_i64(tcg_ctx, t0, t1, t0); + break; + case OPC_PINSRH_0: tcg_gen_deposit_i64(tcg_ctx, t0, t0, t1, 0, 16); break;