[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] tcg/mips: Bugfix for crash when running program wit
From: |
Jiang Biao |
Subject: |
[Qemu-devel] [PATCH] tcg/mips: Bugfix for crash when running program with qemu-i386. |
Date: |
Fri, 7 Jul 2017 11:15:07 +0800 |
When running a helloworld program with qemu-i386 in linux-user
mode on Loongson 3A3000, it will crash. This patch fix the bug.
Signed-off-by: Jiang Biao <address@hidden>
---
tcg/mips/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c
index 8cff9a6..e6fedc9 100644
--- a/tcg/mips/tcg-target.inc.c
+++ b/tcg/mips/tcg-target.inc.c
@@ -1540,7 +1540,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg
*args, bool is_64)
#else
if (TCG_TARGET_REG_BITS > TARGET_LONG_BITS) {
tcg_out_ext32u(s, base, addr_regl);
- addr_regl = base;
+ tcg_out_mov(s, TCG_TYPE_PTR, addr_regl, base);
}
if (guest_base == 0 && data_regl != addr_regl) {
base = addr_regl;
--
2.7.4
- [Qemu-devel] [PATCH] tcg/mips: Bugfix for crash when running program with qemu-i386.,
Jiang Biao <=