aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.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 /gdbstub.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 'gdbstub.c')
-rw-r--r--gdbstub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 64f4a9fffb..f110d1e829 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -610,17 +610,17 @@ static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf)
ptr = mem_buf;
for (i = 0; i < 32; i++)
{
- *(target_ulong *)ptr = tswapl(env->gpr[i][env->current_tc]);
+ *(target_ulong *)ptr = tswapl(env->gpr[env->current_tc][i]);
ptr += sizeof(target_ulong);
}
*(target_ulong *)ptr = (int32_t)tswap32(env->CP0_Status);
ptr += sizeof(target_ulong);
- *(target_ulong *)ptr = tswapl(env->LO[0][env->current_tc]);
+ *(target_ulong *)ptr = tswapl(env->LO[env->current_tc][0]);
ptr += sizeof(target_ulong);
- *(target_ulong *)ptr = tswapl(env->HI[0][env->current_tc]);
+ *(target_ulong *)ptr = tswapl(env->HI[env->current_tc][0]);
ptr += sizeof(target_ulong);
*(target_ulong *)ptr = tswapl(env->CP0_BadVAddr);
@@ -687,17 +687,17 @@ static void cpu_gdb_write_registers(CPUState *env, uint8_t *mem_buf, int size)
ptr = mem_buf;
for (i = 0; i < 32; i++)
{
- env->gpr[i][env->current_tc] = tswapl(*(target_ulong *)ptr);
+ env->gpr[env->current_tc][i] = tswapl(*(target_ulong *)ptr);
ptr += sizeof(target_ulong);
}
env->CP0_Status = tswapl(*(target_ulong *)ptr);
ptr += sizeof(target_ulong);
- env->LO[0][env->current_tc] = tswapl(*(target_ulong *)ptr);
+ env->LO[env->current_tc][0] = tswapl(*(target_ulong *)ptr);
ptr += sizeof(target_ulong);
- env->HI[0][env->current_tc] = tswapl(*(target_ulong *)ptr);
+ env->HI[env->current_tc][0] = tswapl(*(target_ulong *)ptr);
ptr += sizeof(target_ulong);
env->CP0_BadVAddr = tswapl(*(target_ulong *)ptr);