Commit 7e4e8865 authored by Stefan Weil's avatar Stefan Weil Committed by Paolo Bonzini

cputlb: Fix regression with TCG interpreter (bug 1310324)

Commit 0f842f8a 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.

Reported-by: default avatarGiovanni Mascellani <>
Signed-off-by: default avatarStefan Weil <>
Signed-off-by: default avatarPaolo Bonzini <>
parent e00fcfea
...@@ -331,8 +331,10 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr) ...@@ -331,8 +331,10 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
} }
#define MMUSUFFIX _cmmu #define MMUSUFFIX _cmmu
#undef GETPC #undef GETPC_ADJ
#define GETPC() ((uintptr_t)0) #define GETPC_ADJ 0
#undef GETRA
#define GETRA() ((uintptr_t)0)
#define SHIFT 0 #define SHIFT 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment