aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-12 21:01:26 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-12 21:01:26 +0000
commitd0dc7dc3274a88db1c9941614454ed842d62cf91 (patch)
tree46e369f2d52daecef62ef93665fdc6dbb21c3b82 /target-mips/op.c
parent577d8dd43779f6ae75cb1b49606443ddab870bda (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.c')
-rw-r--r--target-mips/op.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/target-mips/op.c b/target-mips/op.c
index cece7f1f23..c5187fe9a3 100644
--- a/target-mips/op.c
+++ b/target-mips/op.c
@@ -255,25 +255,25 @@ void op_dup_T0 (void)
void op_load_HI (void)
{
- T0 = env->HI[PARAM1][env->current_tc];
+ T0 = env->HI[env->current_tc][PARAM1];
FORCE_RET();
}
void op_store_HI (void)
{
- env->HI[PARAM1][env->current_tc] = T0;
+ env->HI[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
void op_load_LO (void)
{
- T0 = env->LO[PARAM1][env->current_tc];
+ T0 = env->LO[env->current_tc][PARAM1];
FORCE_RET();
}
void op_store_LO (void)
{
- env->LO[PARAM1][env->current_tc] = T0;
+ env->LO[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
@@ -368,8 +368,8 @@ void op_div (void)
void op_div (void)
{
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);
}
FORCE_RET();
}
@@ -378,8 +378,8 @@ void op_div (void)
void op_divu (void)
{
if (T1 != 0) {
- env->LO[0][env->current_tc] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
- env->HI[0][env->current_tc] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
+ env->LO[env->current_tc][0] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
+ env->HI[env->current_tc][0] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
}
FORCE_RET();
}
@@ -447,8 +447,8 @@ void op_ddivu (void)
void op_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;
}
FORCE_RET();
}
@@ -869,26 +869,26 @@ void op_mulshiu (void)
static always_inline uint64_t get_HILO (void)
{
- return ((uint64_t)env->HI[0][env->current_tc] << 32) |
- ((uint64_t)(uint32_t)env->LO[0][env->current_tc]);
+ return ((uint64_t)env->HI[env->current_tc][0] << 32) |
+ ((uint64_t)(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 & 0xFFFFFFFF);
- env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+ env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+ 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 op_mult (void)
@@ -1029,13 +1029,13 @@ void op_mulshiu (void)
#if defined(TARGET_MIPS64)
void op_dmult (void)
{
- CALL_FROM_TB4(muls64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+ CALL_FROM_TB4(muls64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
FORCE_RET();
}
void op_dmultu (void)
{
- CALL_FROM_TB4(mulu64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+ CALL_FROM_TB4(mulu64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
FORCE_RET();
}
#endif
@@ -1044,14 +1044,14 @@ void op_dmultu (void)
void op_movn (void)
{
if (T1 != 0)
- env->gpr[PARAM1][env->current_tc] = T0;
+ env->gpr[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
void op_movz (void)
{
if (T1 == 0)
- env->gpr[PARAM1][env->current_tc] = T0;
+ env->gpr[env->current_tc][PARAM1] = T0;
FORCE_RET();
}