target-mips: Fix Loongson pandn instruction.
PATCH v2 1/1 target-mips: Fix Loongson pandn instruction.
From: Heiher <[email protected]>
pandn FD, FS, FT
Operation: FD = ((NOT FS) AND FT)
Signed-off-by Heiher <[email protected]>
Signed-off-by Fuxin Zhang <[email protected]>
--- target-mips/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
target-mips/translate.c +4 -1
@@ -3945,9 +3945,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 (t0, t1, t0); +break ; +case OPC_PINSRH_0 :tcg_gen_deposit_i64 (t0, t0, t1,0 ,16 );break ;
Signature · 1 line
2.10.0
Quoted 20 lines · Heiher
From: Heiher <[email protected]>
pandn FD, FS, FT
Operation: FD = ((NOT FS) AND FT)Signed-off-by Heiher <[email protected]>Signed-off-by Fuxin Zhang <[email protected]>--- target-mips/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)target-mips/translate.c +0
-0@@ -3945,9 +3945,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);
target-mips/translate.c static void gen_loongson_multimedia(DisasContext *ctx, int rd, int rs, int rt) · line 3956
Quoted 10 lines
target-mips/translate.c +4
-1-LMI_DIRECT (PANDN , pandn, andc);LMI_DIRECT (OR , or, or); +case OPC_PANDN : +tcg_gen_andc_i64 (t0, t1, t0); +break ; +case OPC_PINSRH_0 :tcg_gen_deposit_i64 (t0, t0, t1,0 ,16 );break ;
Reviewed-by Yongbok Kim <[email protected]>
Regards,
Yongbok