From e141ab52d2ea5d0bc6ad3b1ad32841127ca04adc Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 18 Sep 2011 14:55:46 +0000 Subject: softmmu templates: optionally pass CPUState to memory access functions Optionally, make memory access helpers take a parameter for CPUState instead of relying on global env. On most targets, perform simple moves to reorder registers. On i386, switch from regparm(3) calling convention to standard stack-based version. Signed-off-by: Blue Swirl --- cpu-all.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cpu-all.h') diff --git a/cpu-all.h b/cpu-all.h index 8ad1ec7..9621c3c 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -259,12 +259,21 @@ extern unsigned long reserved_va; #define stfl(p, v) stfl_raw(p, v) #define stfq(p, v) stfq_raw(p, v) +#ifndef CONFIG_TCG_PASS_AREG0 #define ldub_code(p) ldub_raw(p) #define ldsb_code(p) ldsb_raw(p) #define lduw_code(p) lduw_raw(p) #define ldsw_code(p) ldsw_raw(p) #define ldl_code(p) ldl_raw(p) #define ldq_code(p) ldq_raw(p) +#else +#define cpu_ldub_code(env1, p) ldub_raw(p) +#define cpu_ldsb_code(env1, p) ldsb_raw(p) +#define cpu_lduw_code(env1, p) lduw_raw(p) +#define cpu_ldsw_code(env1, p) ldsw_raw(p) +#define cpu_ldl_code(env1, p) ldl_raw(p) +#define cpu_ldq_code(env1, p) ldq_raw(p) +#endif #define ldub_kernel(p) ldub_raw(p) #define ldsb_kernel(p) ldsb_raw(p) -- cgit v1.1