OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a25cc2
)
tcg/mips: fix crash in tcg_out_qemu_ld()
author
Aurelien Jarno
<aurelien@aurel32.net>
Tue, 9 Feb 2010 21:54:22 +0000
(22:54 +0100)
committer
Aurelien Jarno
<aurelien@aurel32.net>
Tue, 9 Feb 2010 21:54:22 +0000
(22:54 +0100)
The address register is overriden when it corresponds to v0 and the fast
path is taken, which leads to a crash. Fix that by using the a0 register
instead.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/mips/tcg-target.c
patch
|
blob
|
history
diff --git
a/tcg/mips/tcg-target.c
b/tcg/mips/tcg-target.c
index
7fe6707
..
ec687ad
100644
(file)
--- a/
tcg/mips/tcg-target.c
+++ b/
tcg/mips/tcg-target.c
@@
-855,9
+855,9
@@
static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
/* label1: fast path */
reloc_pc16(label1_ptr, (tcg_target_long) s->code_ptr);
- tcg_out_opc_imm(s, OPC_LW, TCG_REG_
V
0, TCG_REG_A0,
+ tcg_out_opc_imm(s, OPC_LW, TCG_REG_
A
0, TCG_REG_A0,
offsetof(CPUState, tlb_table[mem_index][0].addend) + addr_meml);
- tcg_out_opc_reg(s, OPC_ADDU, TCG_REG_V0, TCG_REG_
V
0, addr_regl);
+ tcg_out_opc_reg(s, OPC_ADDU, TCG_REG_V0, TCG_REG_
A
0, addr_regl);
addr_reg1 = TCG_REG_V0;
#endif