diff options
author | Stefan Weil <sw@weilnetz.de> | 2014-04-28 19:20:00 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-05 16:03:37 +0200 |
commit | 7e4e88656c1e6192e9e47a2054d2dc190c1b840b (patch) | |
tree | a001189038c632f91eb3019d7253707194e5b896 | |
parent | e00fcfeab3d452cba3d0a08991a39ab15df66424 (diff) | |
download | qemu-7e4e88656c1e6192e9e47a2054d2dc190c1b840b.tar.gz qemu-7e4e88656c1e6192e9e47a2054d2dc190c1b840b.tar.bz2 qemu-7e4e88656c1e6192e9e47a2054d2dc190c1b840b.zip |
cputlb: Fix regression with TCG interpreter (bug 1310324)
Commit 0f842f8a246f2b5b51a11c13f933bf7a90ae8e96 replaced GETPC_EXT() which
was derived from GETPC() by GETRA_EXT() without fixing cputlb.c. A later
patch replaced GETRA_EXT() by GETRA() in exec/softmmu_template.h which
is included in cputlb.c.
The TCG interpreter failed because the values returned by GETRA() were no
longer explicitly set to 0. The redefinition of GETRA() introduced here
fixes this.
In addition, GETPC_ADJ which is also used in exec/softmmu_template.h is
set to 0. Both changes reduce the compiled code size for cputlb.c by more
than 100 bytes, so the normal TCG without interpreter also profits from
the reduced code size and slightly faster code.
Cc: qemu-stable@nongnu.org
Reported-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | cputlb.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -331,8 +331,10 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr) } #define MMUSUFFIX _cmmu -#undef GETPC -#define GETPC() ((uintptr_t)0) +#undef GETPC_ADJ +#define GETPC_ADJ 0 +#undef GETRA +#define GETRA() ((uintptr_t)0) #define SOFTMMU_CODE_ACCESS #define SHIFT 0 |