aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg-op.h
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-04 23:52:47 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-04 23:52:47 +0000
commit21fc3cfc10a016a8cd253898b5c1cb8f331983e5 (patch)
tree1f88f3efba0594d2bc0e7d5301cca8b03ec43b16 /tcg/tcg-op.h
parentf32d7ec5375356a5d08cbda9d39b4ea97ef42e9d (diff)
32-bit host sign extension fix (Juergen Lock).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4017 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg-op.h')
-rw-r--r--tcg/tcg-op.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index e5047418a6..602a6bf9ce 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -1172,7 +1172,7 @@ static inline void tcg_gen_qemu_ld8s(TCGv ret, TCGv addr, int mem_index)
tcg_gen_op3i(INDEX_op_qemu_ld8s, ret, addr, mem_index);
#else
tcg_gen_op4i(INDEX_op_qemu_ld8s, ret, addr, TCGV_HIGH(addr), mem_index);
- tcg_gen_ext8s_i32(TCGV_HIGH(ret), ret);
+ tcg_gen_sari_i32(TCGV_HIGH(ret), ret, 31);
#endif
}
@@ -1192,7 +1192,7 @@ static inline void tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
tcg_gen_op3i(INDEX_op_qemu_ld16s, ret, addr, mem_index);
#else
tcg_gen_op4i(INDEX_op_qemu_ld16s, ret, addr, TCGV_HIGH(addr), mem_index);
- tcg_gen_ext16s_i32(TCGV_HIGH(ret), ret);
+ tcg_gen_sari_i32(TCGV_HIGH(ret), ret, 31);
#endif
}