diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-23 13:15:33 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-23 13:15:33 +0000 |
commit | d8a5950a62ee91d7fd8ed5ba459992b55e9cb3b7 (patch) | |
tree | 576b24f36d86883ab8e2190e51012815ce940c5c | |
parent | b46a8906b34828adec2702f1e918fc9f553f2ad3 (diff) | |
download | qemu-d8a5950a62ee91d7fd8ed5ba459992b55e9cb3b7.zip qemu-d8a5950a62ee91d7fd8ed5ba459992b55e9cb3b7.tar.gz qemu-d8a5950a62ee91d7fd8ed5ba459992b55e9cb3b7.tar.bz2 |
Switch bc1any* instructions off if no MIPS-3D is implemented.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3426 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-mips/translate.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index d69edea..014a430 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -749,6 +749,12 @@ static always_inline void check_cp1_64bitmode(DisasContext *ctx) generate_exception(ctx, EXCP_RI); } +static always_inline void check_cp1_3d(CPUState *env, DisasContext *ctx) +{ + if (unlikely(!(env->fpu->fcr0 & (1 << FCR0_3D)))) + generate_exception(ctx, EXCP_RI); +} + /* * Verify if floating point register is valid; an operation is not defined * if bit 0 of any register specification is set and the FR bit in the @@ -6328,9 +6334,11 @@ static void decode_opc (CPUState *env, DisasContext *ctx) gen_cp1(ctx, op1, rt, rd); break; #endif - case OPC_BC1: case OPC_BC1ANY2: case OPC_BC1ANY4: + check_cp1_3d(env, ctx); + /* fall through */ + case OPC_BC1: gen_compute_branch1(env, ctx, MASK_BC1(ctx->opcode), (rt >> 2) & 0x7, imm << 2); return; |