diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2016-12-05 10:56:45 +0000 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-12-05 10:56:45 +0000 |
commit | bc66cedb4141fb7588f2462c74310d8fb5dd4cf1 (patch) | |
tree | ee873949b8c4404a837a9e6a3047c89f1431be61 | |
parent | bd8ef5060dd2124a54578241da9a572faf7658dd (diff) | |
parent | e6e2784cacd4cfec149a7690976b9ff15e541c4d (diff) |
Merge remote-tracking branch 'yongbok/tags/mips-20161204' into staging
MIPS patches 2016-12-04
Changes:
* Fix Loongson instructions
* Fix bad shifts in {dextp|dextpdp}
# gpg: Signature made Sun 04 Dec 2016 01:39:38 AM GMT
# gpg: using RSA key 0x2238EB86D5F797C2
# gpg: Can't check signature: public key not found
* yongbok/tags/mips-20161204:
target-mips: fix bad shifts in {dextp|dextpdp}
target-mips: Fix Loongson multimedia instructions.
target-mips: Fix Loongson multimedia 'or' instruction.
target-mips: Fix Loongson pandn instruction.
Message-id: 1480816817-53245-1-git-send-email-yongbok.kim@imgtec.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | target-mips/dsp_helper.c | 4 | ||||
-rw-r--r-- | target-mips/translate.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c index df7d2204b0..dc707934ea 100644 --- a/target-mips/dsp_helper.c +++ b/target-mips/dsp_helper.c @@ -3477,7 +3477,7 @@ target_ulong helper_dextp(target_ulong ac, target_ulong size, CPUMIPSState *env) if (sub >= -1) { temp = (tempB << (64 - len)) | (tempA >> len); - temp = temp & ((0x01 << (size + 1)) - 1); + temp = temp & ((1ULL << (size + 1)) - 1); set_DSPControl_efi(0, env); } else { set_DSPControl_efi(1, env); @@ -3506,7 +3506,7 @@ target_ulong helper_dextpdp(target_ulong ac, target_ulong size, if (sub >= -1) { temp = (tempB << (64 - len)) | (tempA >> len); - temp = temp & ((0x01 << (size + 1)) - 1); + temp = temp & ((1ULL << (size + 1)) - 1); set_DSPControl_pos(sub, env); set_DSPControl_efi(0, env); } else { diff --git a/target-mips/translate.c b/target-mips/translate.c index d8dde7a2f5..57b824ff2d 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -3871,6 +3871,7 @@ static void gen_loongson_multimedia(DisasContext *ctx, int rd, int rs, int rt) break; } + check_cp1_enabled(ctx); gen_load_fpr64(ctx, t0, rs); gen_load_fpr64(ctx, t1, rt); @@ -3945,8 +3946,11 @@ 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); + LMI_DIRECT(OR_CP2, 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); |