From 01ecaf438b1eb46abe23392c8ce5b7628b0c8cf5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 26 Jul 2016 06:09:16 +0530 Subject: tcg: Merge GETPC and GETRA The return address argument to the softmmu template helpers was confused. In the legacy case, we wanted to indicate that there is no return address, and so passed in NULL. However, we then immediately subtracted GETPC_ADJ from NULL, resulting in a non-zero value, indicating the presence of an (invalid) return address. Push the GETPC_ADJ subtraction down to the only point it's required: immediately before use within cpu_restore_state_from_tb, after all NULL pointer checks have been completed. This makes GETPC and GETRA identical. Remove GETRA as the lesser used macro, replacing all uses with GETPC. Signed-off-by: Richard Henderson --- cputlb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cputlb.c') diff --git a/cputlb.c b/cputlb.c index d068ee597e..3c99c34ac8 100644 --- a/cputlb.c +++ b/cputlb.c @@ -543,10 +543,8 @@ static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index, #undef MMUSUFFIX #define MMUSUFFIX _cmmu -#undef GETPC_ADJ -#define GETPC_ADJ 0 -#undef GETRA -#define GETRA() ((uintptr_t)0) +#undef GETPC +#define GETPC() ((uintptr_t)0) #define SOFTMMU_CODE_ACCESS #define SHIFT 0 -- cgit v1.2.3