• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision8b8d768f19037a825a0bc81654492caa7c8fab8b (tree)
Time2017-07-10 16:11:38
AuthorJiang Biao <jiang.biao2@zte....>
CommiterRichard Henderson

Log Message

tcg/mips: Bugfix for crash when running program with qemu-i386.

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 <jiang.biao2@zte.com.cn>
Message-Id: <1499669979-25904-1-git-send-email-jiang.biao2@zte.com.cn>
Signed-off-by: Richard Henderson <rth@twiddle.net>

Change Summary

Incremental Difference

--- a/tcg/mips/tcg-target.inc.c
+++ b/tcg/mips/tcg-target.inc.c
@@ -1547,8 +1547,8 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, bool is_64)
15471547 } else if (guest_base == (int16_t)guest_base) {
15481548 tcg_out_opc_imm(s, ALIAS_PADDI, base, addr_regl, guest_base);
15491549 } else {
1550- tcg_out_movi(s, TCG_TYPE_PTR, base, guest_base);
1551- tcg_out_opc_reg(s, ALIAS_PADD, base, base, addr_regl);
1550+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_TMP0, guest_base);
1551+ tcg_out_opc_reg(s, ALIAS_PADD, base, TCG_TMP0, addr_regl);
15521552 }
15531553 tcg_out_qemu_ld_direct(s, data_regl, data_regh, base, opc, is_64);
15541554 #endif
@@ -1652,8 +1652,8 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, bool is_64)
16521652 } else if (guest_base == (int16_t)guest_base) {
16531653 tcg_out_opc_imm(s, ALIAS_PADDI, base, addr_regl, guest_base);
16541654 } else {
1655- tcg_out_movi(s, TCG_TYPE_PTR, base, guest_base);
1656- tcg_out_opc_reg(s, ALIAS_PADD, base, base, addr_regl);
1655+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_TMP0, guest_base);
1656+ tcg_out_opc_reg(s, ALIAS_PADD, base, TCG_TMP0, addr_regl);
16571657 }
16581658 tcg_out_qemu_st_direct(s, data_regl, data_regh, base, opc);
16591659 #endif