diff mbox

[v2] target-mips: Fix Loongson pandn instruction.

Message ID 20161014024604.3315-1-r@hev.cc
State New
Headers show

Commit Message

hev Oct. 14, 2016, 2:46 a.m. UTC
From: Heiher <wangr@lemote.com>

pandn FD, FS, FT
Operation: FD = ((NOT FS) AND FT)

Signed-off-by: Heiher <wangr@lemote.com>
Signed-off-by: Fuxin Zhang <zhangfx@lemote.com>
---
 target-mips/translate.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Yongbok Kim Oct. 14, 2016, 3:50 p.m. UTC | #1
On 14/10/2016 03:46, Heiher wrote:
> From: Heiher <wangr@lemote.com>
> 
> pandn FD, FS, FT
> Operation: FD = ((NOT FS) AND FT)
> 
> Signed-off-by: Heiher <wangr@lemote.com>
> Signed-off-by: Fuxin Zhang <zhangfx@lemote.com>
> ---
>  target-mips/translate.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 55c2ca0..1412347 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -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;
> 


Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>

Regards,
Yongbok
diff mbox

Patch

diff --git a/target-mips/translate.c b/target-mips/translate.c
index 55c2ca0..1412347 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -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;