diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-02-12 21:01:26 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-02-12 21:01:26 +0000 |
commit | d0dc7dc3274a88db1c9941614454ed842d62cf91 (patch) | |
tree | 46e369f2d52daecef62ef93665fdc6dbb21c3b82 /target-mips/op_helper.c | |
parent | 577d8dd43779f6ae75cb1b49606443ddab870bda (diff) |
Make MIPS MT implementation more cache friendly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3981 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r-- | target-mips/op_helper.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 07353567de..26420aa3cb 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -163,25 +163,25 @@ void do_dclz (void) #if TARGET_LONG_BITS > HOST_LONG_BITS static always_inline uint64_t get_HILO (void) { - return (env->HI[0][env->current_tc] << 32) | (uint32_t)env->LO[0][env->current_tc]; + return (env->HI[env->current_tc][0] << 32) | (uint32_t)env->LO[env->current_tc][0]; } static always_inline void set_HILO (uint64_t HILO) { - env->LO[0][env->current_tc] = (int32_t)HILO; - env->HI[0][env->current_tc] = (int32_t)(HILO >> 32); + env->LO[env->current_tc][0] = (int32_t)HILO; + env->HI[env->current_tc][0] = (int32_t)(HILO >> 32); } static always_inline void set_HIT0_LO (uint64_t HILO) { - env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF); - T0 = env->HI[0][env->current_tc] = (int32_t)(HILO >> 32); + env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF); + T0 = env->HI[env->current_tc][0] = (int32_t)(HILO >> 32); } static always_inline void set_HI_LOT0 (uint64_t HILO) { - T0 = env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF); - env->HI[0][env->current_tc] = (int32_t)(HILO >> 32); + T0 = env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF); + env->HI[env->current_tc][0] = (int32_t)(HILO >> 32); } void do_mult (void) @@ -303,8 +303,8 @@ void do_div (void) { /* 64bit datatypes because we may see overflow/underflow. */ if (T1 != 0) { - env->LO[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1); - env->HI[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1); + env->LO[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1); + env->HI[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1); } } #endif @@ -316,12 +316,12 @@ void do_ddiv (void) int64_t arg0 = (int64_t)T0; int64_t arg1 = (int64_t)T1; if (arg0 == ((int64_t)-1 << 63) && arg1 == (int64_t)-1) { - env->LO[0][env->current_tc] = arg0; - env->HI[0][env->current_tc] = 0; + env->LO[env->current_tc][0] = arg0; + env->HI[env->current_tc][0] = 0; } else { lldiv_t res = lldiv(arg0, arg1); - env->LO[0][env->current_tc] = res.quot; - env->HI[0][env->current_tc] = res.rem; + env->LO[env->current_tc][0] = res.quot; + env->HI[env->current_tc][0] = res.rem; } } } @@ -330,8 +330,8 @@ void do_ddiv (void) void do_ddivu (void) { if (T1 != 0) { - env->LO[0][env->current_tc] = T0 / T1; - env->HI[0][env->current_tc] = T0 % T1; + env->LO[env->current_tc][0] = T0 / T1; + env->HI[env->current_tc][0] = T0 % T1; } } #endif @@ -627,21 +627,21 @@ void do_pmon (int function) function /= 2; switch (function) { case 2: /* TODO: char inbyte(int waitflag); */ - if (env->gpr[4][env->current_tc] == 0) - env->gpr[2][env->current_tc] = -1; + if (env->gpr[env->current_tc][4] == 0) + env->gpr[env->current_tc][2] = -1; /* Fall through */ case 11: /* TODO: char inbyte (void); */ - env->gpr[2][env->current_tc] = -1; + env->gpr[env->current_tc][2] = -1; break; case 3: case 12: - printf("%c", (char)(env->gpr[4][env->current_tc] & 0xFF)); + printf("%c", (char)(env->gpr[env->current_tc][4] & 0xFF)); break; case 17: break; case 158: { - unsigned char *fmt = (void *)(unsigned long)env->gpr[4][env->current_tc]; + unsigned char *fmt = (void *)(unsigned long)env->gpr[env->current_tc][4]; printf("%s", fmt); } break; |