Use temporaries instead of fixed registers for some instructions.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4784 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
ths 2008-06-24 15:12:27 +00:00
parent 8ff9cbf776
commit 6c5c1e2057
3 changed files with 408 additions and 303 deletions

View File

@ -152,11 +152,11 @@ DEF_HELPER(target_ulong, do_dmt, (target_ulong t0))
DEF_HELPER(target_ulong, do_emt, (target_ulong t0)) DEF_HELPER(target_ulong, do_emt, (target_ulong t0))
DEF_HELPER(target_ulong, do_dvpe, (target_ulong t0)) DEF_HELPER(target_ulong, do_dvpe, (target_ulong t0))
DEF_HELPER(target_ulong, do_evpe, (target_ulong t0)) DEF_HELPER(target_ulong, do_evpe, (target_ulong t0))
DEF_HELPER(target_ulong, do_fork, (target_ulong t0, target_ulong t1)) DEF_HELPER(void, do_fork, (target_ulong t0, target_ulong t1))
DEF_HELPER(target_ulong, do_yield, (target_ulong t0)) DEF_HELPER(target_ulong, do_yield, (target_ulong t0))
/* CP1 functions */ /* CP1 functions */
DEF_HELPER(target_ulong, do_cfc1, (target_ulong t0, uint32_t reg)) DEF_HELPER(target_ulong, do_cfc1, (uint32_t reg))
DEF_HELPER(void, do_ctc1, (target_ulong t0, uint32_t reg)) DEF_HELPER(void, do_ctc1, (target_ulong t0, uint32_t reg))
DEF_HELPER(void, do_float_cvtd_s, (void)) DEF_HELPER(void, do_float_cvtd_s, (void))
@ -241,8 +241,8 @@ FOP_PROTO(ngt)
/* Special functions */ /* Special functions */
DEF_HELPER(target_ulong, do_di, (target_ulong t0)) DEF_HELPER(target_ulong, do_di, (target_ulong t0))
DEF_HELPER(target_ulong, do_ei, (target_ulong t0)) DEF_HELPER(target_ulong, do_ei, (target_ulong t0))
DEF_HELPER(void, do_eret, (target_ulong t0)) DEF_HELPER(void, do_eret, (void))
DEF_HELPER(void, do_deret, (target_ulong t0)) DEF_HELPER(void, do_deret, (void))
DEF_HELPER(target_ulong, do_rdhwr_cpunum, (target_ulong t0)) DEF_HELPER(target_ulong, do_rdhwr_cpunum, (target_ulong t0))
DEF_HELPER(target_ulong, do_rdhwr_synci_step, (target_ulong t0)) DEF_HELPER(target_ulong, do_rdhwr_synci_step, (target_ulong t0))
DEF_HELPER(target_ulong, do_rdhwr_cc, (target_ulong t0)) DEF_HELPER(target_ulong, do_rdhwr_cc, (target_ulong t0))

View File

@ -1438,13 +1438,11 @@ target_ulong do_evpe(target_ulong t0)
return t0; return t0;
} }
target_ulong do_fork(target_ulong t0, target_ulong t1) void do_fork(target_ulong t0, target_ulong t1)
{ {
// t0 = rt, t1 = rs // t0 = rt, t1 = rs
t0 = 0; t0 = 0;
// TODO: store to TC register // TODO: store to TC register
return t0;
} }
target_ulong do_yield(target_ulong t0) target_ulong do_yield(target_ulong t0)
@ -1684,7 +1682,7 @@ void debug_post_eret (void)
} }
} }
void do_eret (target_ulong t0) void do_eret (void)
{ {
if (loglevel & CPU_LOG_EXEC) if (loglevel & CPU_LOG_EXEC)
debug_pre_eret(); debug_pre_eret();
@ -1701,7 +1699,7 @@ void do_eret (target_ulong t0)
env->CP0_LLAddr = 1; env->CP0_LLAddr = 1;
} }
void do_deret (target_ulong t0) void do_deret (void)
{ {
if (loglevel & CPU_LOG_EXEC) if (loglevel & CPU_LOG_EXEC)
debug_pre_eret(); debug_pre_eret();
@ -1918,8 +1916,10 @@ unsigned int ieee_rm[] = {
#define RESTORE_ROUNDING_MODE \ #define RESTORE_ROUNDING_MODE \
set_float_rounding_mode(ieee_rm[env->fpu->fcr31 & 3], &env->fpu->fp_status) set_float_rounding_mode(ieee_rm[env->fpu->fcr31 & 3], &env->fpu->fp_status)
target_ulong do_cfc1 (target_ulong t0, uint32_t reg) target_ulong do_cfc1 (uint32_t reg)
{ {
target_ulong t0;
switch (reg) { switch (reg) {
case 0: case 0:
t0 = (int32_t)env->fpu->fcr0; t0 = (int32_t)env->fpu->fcr0;

File diff suppressed because it is too large Load Diff