]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: Merge GETPC and GETRA
authorRichard Henderson <rth@twiddle.net>
Tue, 26 Jul 2016 00:39:16 +0000 (06:09 +0530)
committerRichard Henderson <rth@twiddle.net>
Fri, 16 Sep 2016 15:12:11 +0000 (08:12 -0700)
commit01ecaf438b1eb46abe23392c8ce5b7628b0c8cf5
tree8d5d6d640cb0994345a508213f716b08708b171e
parent85aa80813dd9f5c1f581c743e45678a3bee220f8
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 <rth@twiddle.net>
cputlb.c
include/exec/exec-all.h
softmmu_template.h
target-arm/helper.c
target-mips/op_helper.c
translate-all.c
user-exec.c