提交 8979596d 编写于 作者: B blueswir1

Fix Sparc64 double float gdb protocol (initial version by Paul Brook)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2666 c046a42c-6fe2-441c-8c8c-71466251a162
上级 3ccacc4a
......@@ -377,9 +377,9 @@ static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf)
for (i = 0; i < 64; i += 2) {
uint64_t tmp;
tmp = (uint64_t)tswap32(*((uint32_t *)&env->fpr[i])) << 32;
tmp |= tswap32(*((uint32_t *)&env->fpr[i + 1]));
registers[i/2 + 32] = tmp;
tmp = ((uint64_t)*(uint32_t *)&env->fpr[i]) << 32;
tmp |= *(uint32_t *)&env->fpr[i + 1];
registers[i / 2 + 32] = tswap64(tmp);
}
registers[64] = tswapl(env->pc);
registers[65] = tswapl(env->npc);
......@@ -419,8 +419,11 @@ static void cpu_gdb_write_registers(CPUState *env, uint8_t *mem_buf, int size)
env->fsr = tswapl(registers[70]);
#else
for (i = 0; i < 64; i += 2) {
*((uint32_t *)&env->fpr[i]) = tswap32(registers[i/2 + 32] >> 32);
*((uint32_t *)&env->fpr[i + 1]) = tswap32(registers[i/2 + 32] & 0xffffffff);
uint64_t tmp;
tmp = tswap64(registers[i / 2 + 32]);
*((uint32_t *)&env->fpr[i]) = tmp >> 32;
*((uint32_t *)&env->fpr[i + 1]) = tmp & 0xffffffff;
}
env->pc = tswapl(registers[64]);
env->npc = tswapl(registers[65]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册