diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-13 15:51:14 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-13 15:51:14 +0000 |
commit | f60d2728cc27cd1eb05ad1cde13dc41810963128 (patch) | |
tree | be76ea1674c31886edda5d160c0c24e4598f7060 /target-i386/translate.c | |
parent | d40c54d641148b29457c2cb2abf6038bcea889c1 (diff) | |
download | hqemu-f60d2728cc27cd1eb05ad1cde13dc41810963128.zip hqemu-f60d2728cc27cd1eb05ad1cde13dc41810963128.tar.gz |
Fix smsw for x86_64 guest and bigendian host case
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6009 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/translate.c')
-rw-r--r-- | target-i386/translate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c index 0fd509a..3c71c95 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -7078,7 +7078,11 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) break; case 4: /* smsw */ gen_svm_check_intercept(s, pc_start, SVM_EXIT_READ_CR0); +#if defined TARGET_X86_64 && defined WORDS_BIGENDIAN + tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]) + 4); +#else tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0])); +#endif gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 1); break; case 6: /* lmsw */ |