diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-06-14 15:02:05 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-06-14 15:02:05 +0000 |
commit | eda9b09b1df1efea4275baadb9743ff5124bd7c2 (patch) | |
tree | 8f7e9abf255787610f90f4a0be68c3c42dc6c50c /target-sh4/op.c | |
parent | 191f9a93f48ba8859bbbc8d5ac9b401568c2c6f4 (diff) |
sh4 fmov et al instructions (amatus)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1971 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/op.c')
-rw-r--r-- | target-sh4/op.c | 86 |
1 files changed, 85 insertions, 1 deletions
diff --git a/target-sh4/op.c b/target-sh4/op.c index dbab658db7..64f952fc54 100644 --- a/target-sh4/op.c +++ b/target-sh4/op.c @@ -228,6 +228,18 @@ void OPPROTO op_sett(void) RETURN(); } +void OPPROTO op_frchg(void) +{ + env->fpscr ^= FPSCR_FR; + RETURN(); +} + +void OPPROTO op_fschg(void) +{ + env->fpscr ^= FPSCR_SZ; + RETURN(); +} + void OPPROTO op_rte(void) { env->sr = env->ssr; @@ -465,6 +477,18 @@ void OPPROTO op_ldcl_rMplus_rN_bank(void) RETURN(); } +void OPPROTO op_ldc_T0_sr(void) +{ + env->sr = T0 & 0x700083f3; + RETURN(); +} + +void OPPROTO op_stc_sr_T0(void) +{ + T0 = env->sr; + RETURN(); +} + #define LDSTOPS(target,load,store) \ void OPPROTO op_##load##_T0_##target (void) \ { env ->target = T0; RETURN(); \ @@ -473,7 +497,6 @@ void OPPROTO op_##store##_##target##_T0 (void) \ { T0 = env->target; RETURN(); \ } \ -LDSTOPS(sr, ldc, stc) LDSTOPS(gbr, ldc, stc) LDSTOPS(vbr, ldc, stc) LDSTOPS(ssr, ldc, stc) @@ -483,6 +506,19 @@ LDSTOPS(sr, ldc, stc) LDSTOPS(mach, lds, sts) LDSTOPS(macl, lds, sts) LDSTOPS(pr, lds, sts) + LDSTOPS(fpul, lds, sts) + +void OPPROTO op_lds_T0_fpscr(void) +{ + env->fpscr = T0 & 0x003fffff; + RETURN(); +} + +void OPPROTO op_sts_fpscr_T0(void) +{ + T0 = env->fpscr & 0x003fffff; + RETURN(); +} void OPPROTO op_movt_rN(void) { @@ -659,6 +695,30 @@ void OPPROTO op_movl_imm_rN(void) RETURN(); } +void OPPROTO op_fmov_frN_FT0(void) +{ + FT0 = *(float32 *)&env->fregs[PARAM1]; + RETURN(); +} + +void OPPROTO op_fmov_drN_DT0(void) +{ + DT0 = *(float64 *)&env->fregs[PARAM1]; + RETURN(); +} + +void OPPROTO op_fmov_FT0_frN(void) +{ + *(float32 *)&env->fregs[PARAM1] = FT0; + RETURN(); +} + +void OPPROTO op_fmov_DT0_drN(void) +{ + *(float64 *)&env->fregs[PARAM1] = DT0; + RETURN(); +} + void OPPROTO op_dec1_rN(void) { env->gregs[PARAM1] -= 1; @@ -677,6 +737,12 @@ void OPPROTO op_dec4_rN(void) RETURN(); } +void OPPROTO op_dec8_rN(void) +{ + env->gregs[PARAM1] -= 4; + RETURN(); +} + void OPPROTO op_inc1_rN(void) { env->gregs[PARAM1] += 1; @@ -695,6 +761,12 @@ void OPPROTO op_inc4_rN(void) RETURN(); } +void OPPROTO op_inc8_rN(void) +{ + env->gregs[PARAM1] += 4; + RETURN(); +} + void OPPROTO op_add_T0_rN(void) { env->gregs[PARAM1] += T0; @@ -779,6 +851,18 @@ void OPPROTO op_movl_T0_T1(void) RETURN(); } +void OPPROTO op_movl_fpul_FT0(void) +{ + FT0 = *(float32 *)&env->fpul; + RETURN(); +} + +void OPPROTO op_movl_FT0_fpul(void) +{ + *(float32 *)&env->fpul = FT0; + RETURN(); +} + void OPPROTO op_goto_tb0(void) { GOTO_TB(op_goto_tb0, PARAM1, 0); |