OSDN Git Service

exec: Reorganize the GETRA/GETPC macros
authorRichard Henderson <rth@twiddle.net>
Tue, 27 Aug 2013 17:22:54 +0000 (10:22 -0700)
committerRichard Henderson <rth@twiddle.net>
Mon, 2 Sep 2013 16:08:30 +0000 (09:08 -0700)
commit0f842f8a246f2b5b51a11c13f933bf7a90ae8e96
tree2dd695c689fb49d15fe28f2792fde11dba5be55e
parentc72b26ec92eb93a92852ab1d23acb5a945de5062
exec: Reorganize the GETRA/GETPC macros

Always define GETRA; use __builtin_extract_return_addr, rather than
having a special case for s390.  Split GETPC_ADJ out of GETPC; use 2
universally, rather than having a special case for arm.

Rename GETPC_LDST to GETRA_LDST to indicate that it does not
contain the GETPC_ADJ value.  Likewise with GETPC_EXT to GETRA_EXT.

Perform the GETPC_ADJ adjustment inside helper_ret_ld/st.  This will
allow backends to pass along the "true" return address rather than
the massaged GETPC value.  In the meantime, double application of
GETPC_ADJ does not hurt, since the call insn in all ISAs is at least
4 bytes long.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
include/exec/exec-all.h
include/exec/softmmu_template.h