diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-19 20:29:41 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-19 20:29:41 +0000 |
commit | 57fa1fb31c23f1bf78664159d5813206bf2e4d0e (patch) | |
tree | 77bee20de232837daf13873e025093efb17ddd9c /target-mips/op.c | |
parent | f469b9db01a1287ae8946159beace6285c2e213a (diff) | |
download | qemu-57fa1fb31c23f1bf78664159d5813206bf2e4d0e.zip qemu-57fa1fb31c23f1bf78664159d5813206bf2e4d0e.tar.gz qemu-57fa1fb31c23f1bf78664159d5813206bf2e4d0e.tar.bz2 |
More MIPS 64-bit FPU support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2834 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r-- | target-mips/op.c | 68 |
1 files changed, 48 insertions, 20 deletions
diff --git a/target-mips/op.c b/target-mips/op.c index c60871a..8c0c687 100644 --- a/target-mips/op.c +++ b/target-mips/op.c @@ -1609,6 +1609,14 @@ void op_cp1_enabled(void) RETURN(); } +void op_cp1_64bitmode(void) +{ + if (!(env->CP0_Status & (1 << CP0St_FR))) { + CALL_FROM_TB1(do_raise_exception, EXCP_RI); + } + RETURN(); +} + /* * 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 @@ -1946,8 +1954,8 @@ FLOAT_OP(movn, ps) RETURN(); } -/* binary operations */ -#define FLOAT_BINOP(name) \ +/* operations calling helpers, for s, d and ps */ +#define FLOAT_HOP(name) \ FLOAT_OP(name, d) \ { \ CALL_FROM_TB0(do_float_ ## name ## _d); \ @@ -1966,18 +1974,45 @@ FLOAT_OP(name, ps) \ DEBUG_FPU_STATE(); \ RETURN(); \ } -FLOAT_BINOP(add) -FLOAT_BINOP(sub) -FLOAT_BINOP(mul) -FLOAT_BINOP(div) -#undef FLOAT_BINOP +FLOAT_HOP(add) +FLOAT_HOP(sub) +FLOAT_HOP(mul) +FLOAT_HOP(div) +FLOAT_HOP(recip2) +FLOAT_HOP(rsqrt2) +FLOAT_HOP(rsqrt1) +FLOAT_HOP(recip1) +#undef FLOAT_HOP + +/* operations calling helpers, for s and d */ +#define FLOAT_HOP(name) \ +FLOAT_OP(name, d) \ +{ \ + CALL_FROM_TB0(do_float_ ## name ## _d); \ + DEBUG_FPU_STATE(); \ + RETURN(); \ +} \ +FLOAT_OP(name, s) \ +{ \ + CALL_FROM_TB0(do_float_ ## name ## _s); \ + DEBUG_FPU_STATE(); \ + RETURN(); \ +} +FLOAT_HOP(rsqrt) +FLOAT_HOP(recip) +#undef FLOAT_HOP -FLOAT_OP(addr, ps) -{ - CALL_FROM_TB0(do_float_addr_ps); - DEBUG_FPU_STATE(); - RETURN(); +/* operations calling helpers, for ps */ +#define FLOAT_HOP(name) \ +FLOAT_OP(name, ps) \ +{ \ + CALL_FROM_TB0(do_float_ ## name ## _ps); \ + DEBUG_FPU_STATE(); \ + RETURN(); \ } +FLOAT_HOP(addr) +FLOAT_HOP(mulr) +#undef FLOAT_HOP /* ternary operations */ #define FLOAT_TERNOP(name1, name2) \ @@ -2053,14 +2088,7 @@ FLOAT_OP(name, s) \ { \ FST2 = float32_ ## name(FST0, &env->fp_status); \ DEBUG_FPU_STATE(); \ - RETURN(); \ -} \ -FLOAT_OP(name, ps) \ -{ \ - FST2 = float32_ ## name(FST0, &env->fp_status); \ - FSTH2 = float32_ ## name(FSTH0, &env->fp_status); \ - DEBUG_FPU_STATE(); \ - RETURN(); \ + RETURN(); \ } FLOAT_UNOP(sqrt) #undef FLOAT_UNOP |