aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.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 /linux-user/main.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 'linux-user/main.c')
-rw-r--r--linux-user/main.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 164fdb9edb..124b98ca02 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1522,7 +1522,7 @@ void cpu_loop(CPUMIPSState *env)
trapnr = cpu_mips_exec(env);
switch(trapnr) {
case EXCP_SYSCALL:
- syscall_num = env->gpr[2][env->current_tc] - 4000;
+ syscall_num = env->gpr[env->current_tc][2] - 4000;
env->PC[env->current_tc] += 4;
if (syscall_num >= sizeof(mips_syscall_args)) {
ret = -ENOSYS;
@@ -1532,7 +1532,7 @@ void cpu_loop(CPUMIPSState *env)
abi_ulong arg5 = 0, arg6 = 0, arg7 = 0, arg8 = 0;
nb_args = mips_syscall_args[syscall_num];
- sp_reg = env->gpr[29][env->current_tc];
+ sp_reg = env->gpr[env->current_tc][29];
switch (nb_args) {
/* these arguments are taken from the stack */
/* FIXME - what to do if get_user() fails? */
@@ -1543,20 +1543,20 @@ void cpu_loop(CPUMIPSState *env)
default:
break;
}
- ret = do_syscall(env, env->gpr[2][env->current_tc],
- env->gpr[4][env->current_tc],
- env->gpr[5][env->current_tc],
- env->gpr[6][env->current_tc],
- env->gpr[7][env->current_tc],
+ ret = do_syscall(env, env->gpr[env->current_tc][2],
+ env->gpr[env->current_tc][4],
+ env->gpr[env->current_tc][5],
+ env->gpr[env->current_tc][6],
+ env->gpr[env->current_tc][7],
arg5, arg6/*, arg7, arg8*/);
}
if ((unsigned int)ret >= (unsigned int)(-1133)) {
- env->gpr[7][env->current_tc] = 1; /* error flag */
+ env->gpr[env->current_tc][7] = 1; /* error flag */
ret = -ret;
} else {
- env->gpr[7][env->current_tc] = 0; /* error flag */
+ env->gpr[env->current_tc][7] = 0; /* error flag */
}
- env->gpr[2][env->current_tc] = ret;
+ env->gpr[env->current_tc][2] = ret;
break;
case EXCP_TLBL:
case EXCP_TLBS:
@@ -2296,7 +2296,7 @@ int main(int argc, char **argv)
int i;
for(i = 0; i < 32; i++) {
- env->gpr[i][env->current_tc] = regs->regs[i];
+ env->gpr[env->current_tc][i] = regs->regs[i];
}
env->PC[env->current_tc] = regs->cp0_epc;
}