diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 03:36:07 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 03:36:07 +0000 |
commit | c6d6dd7c74aaf8ca156d4589adff060078ec20ef (patch) | |
tree | 90ee5e7bfd3884d1541144ea1ef28712fa22c81e /target-mips/translate.c | |
parent | 8c89395eebc4c88e35949b3310254f0d893379c5 (diff) | |
download | qemu-c6d6dd7c74aaf8ca156d4589adff060078ec20ef.tar.gz qemu-c6d6dd7c74aaf8ca156d4589adff060078ec20ef.tar.bz2 qemu-c6d6dd7c74aaf8ca156d4589adff060078ec20ef.zip |
Fix MIPS64 R2 instructions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3686 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/translate.c')
-rw-r--r-- | target-mips/translate.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index ac439d27a1..b3ae2ccfea 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -1897,43 +1897,49 @@ static void gen_bitops (DisasContext *ctx, uint32_t opc, int rt, goto fail; gen_op_ext(lsb, msb + 1); break; +#if defined(TARGET_MIPS64) case OPC_DEXTM: if (lsb + msb > 63) goto fail; - gen_op_ext(lsb, msb + 1 + 32); + gen_op_dext(lsb, msb + 1 + 32); break; case OPC_DEXTU: if (lsb + msb > 63) goto fail; - gen_op_ext(lsb + 32, msb + 1); + gen_op_dext(lsb + 32, msb + 1); break; case OPC_DEXT: - gen_op_ext(lsb, msb + 1); + if (lsb + msb > 63) + goto fail; + gen_op_dext(lsb, msb + 1); break; +#endif case OPC_INS: if (lsb > msb) goto fail; GEN_LOAD_REG_TN(T0, rt); gen_op_ins(lsb, msb - lsb + 1); break; +#if defined(TARGET_MIPS64) case OPC_DINSM: if (lsb > msb) goto fail; GEN_LOAD_REG_TN(T0, rt); - gen_op_ins(lsb, msb - lsb + 1 + 32); + gen_op_dins(lsb, msb - lsb + 1 + 32); break; case OPC_DINSU: if (lsb > msb) goto fail; GEN_LOAD_REG_TN(T0, rt); - gen_op_ins(lsb + 32, msb - lsb + 1); + gen_op_dins(lsb + 32, msb - lsb + 1); break; case OPC_DINS: if (lsb > msb) goto fail; GEN_LOAD_REG_TN(T0, rt); - gen_op_ins(lsb, msb - lsb + 1); + gen_op_dins(lsb, msb - lsb + 1); break; +#endif default: fail: MIPS_INVAL("bitops"); @@ -6156,6 +6162,7 @@ static void decode_opc (CPUState *env, DisasContext *ctx) break; } GEN_STORE_TN_REG(rd, T0); + break; #endif default: /* Invalid */ MIPS_INVAL("special3"); |