diff options
-rw-r--r-- | softmmu_exec.h | 65 | ||||
-rw-r--r-- | target-arm/exec.h | 1 | ||||
-rw-r--r-- | target-i386/exec.h | 65 | ||||
-rw-r--r-- | target-mips/exec.h | 66 | ||||
-rw-r--r-- | target-ppc/exec.h | 67 | ||||
-rw-r--r-- | target-sparc/exec.h | 66 |
6 files changed, 70 insertions, 260 deletions
diff --git a/softmmu_exec.h b/softmmu_exec.h new file mode 100644 index 0000000000..3b789eeb75 --- /dev/null +++ b/softmmu_exec.h @@ -0,0 +1,65 @@ +/* Common softmmu definitions and inline routines. */ + +#define ldul_user ldl_user +#define ldul_kernel ldl_kernel + +#define ACCESS_TYPE 0 +#define MEMSUFFIX _kernel +#define DATA_SIZE 1 +#include "softmmu_header.h" + +#define DATA_SIZE 2 +#include "softmmu_header.h" + +#define DATA_SIZE 4 +#include "softmmu_header.h" + +#define DATA_SIZE 8 +#include "softmmu_header.h" +#undef ACCESS_TYPE +#undef MEMSUFFIX + +#define ACCESS_TYPE 1 +#define MEMSUFFIX _user +#define DATA_SIZE 1 +#include "softmmu_header.h" + +#define DATA_SIZE 2 +#include "softmmu_header.h" + +#define DATA_SIZE 4 +#include "softmmu_header.h" + +#define DATA_SIZE 8 +#include "softmmu_header.h" +#undef ACCESS_TYPE +#undef MEMSUFFIX + +/* these access are slower, they must be as rare as possible */ +#define ACCESS_TYPE 2 +#define MEMSUFFIX _data +#define DATA_SIZE 1 +#include "softmmu_header.h" + +#define DATA_SIZE 2 +#include "softmmu_header.h" + +#define DATA_SIZE 4 +#include "softmmu_header.h" + +#define DATA_SIZE 8 +#include "softmmu_header.h" +#undef ACCESS_TYPE +#undef MEMSUFFIX + +#define ldub(p) ldub_data(p) +#define ldsb(p) ldsb_data(p) +#define lduw(p) lduw_data(p) +#define ldsw(p) ldsw_data(p) +#define ldl(p) ldl_data(p) +#define ldq(p) ldq_data(p) + +#define stb(p, v) stb_data(p, v) +#define stw(p, v) stw_data(p, v) +#define stl(p, v) stl_data(p, v) +#define stq(p, v) stq_data(p, v) diff --git a/target-arm/exec.h b/target-arm/exec.h index 64fce71537..e4ea93f959 100644 --- a/target-arm/exec.h +++ b/target-arm/exec.h @@ -75,3 +75,4 @@ void do_vfp_cmpes(void); void do_vfp_cmped(void); void do_vfp_set_fpscr(void); void do_vfp_get_fpscr(void); + diff --git a/target-i386/exec.h b/target-i386/exec.h index b1145017d5..61ba3cd6d7 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -210,72 +210,9 @@ void check_iob_DX(void); void check_iow_DX(void); void check_iol_DX(void); -/* XXX: move that to a generic header */ #if !defined(CONFIG_USER_ONLY) -#define ldul_user ldl_user -#define ldul_kernel ldl_kernel - -#define ACCESS_TYPE 0 -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ACCESS_TYPE 1 -#define MEMSUFFIX _user -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -/* these access are slower, they must be as rare as possible */ -#define ACCESS_TYPE 2 -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ldub(p) ldub_data(p) -#define ldsb(p) ldsb_data(p) -#define lduw(p) lduw_data(p) -#define ldsw(p) ldsw_data(p) -#define ldl(p) ldl_data(p) -#define ldq(p) ldq_data(p) - -#define stb(p, v) stb_data(p, v) -#define stw(p, v) stw_data(p, v) -#define stl(p, v) stl_data(p, v) -#define stq(p, v) stq_data(p, v) +#include "softmmu_exec.h" static inline double ldfq(target_ulong ptr) { diff --git a/target-mips/exec.h b/target-mips/exec.h index 77fce26d2b..b3e423493b 100644 --- a/target-mips/exec.h +++ b/target-mips/exec.h @@ -40,71 +40,7 @@ register double FT2 asm(FREG2); #include "exec-all.h" #if !defined(CONFIG_USER_ONLY) - -#define ldul_user ldl_user -#define ldul_kernel ldl_kernel - -#define ACCESS_TYPE 0 -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ACCESS_TYPE 1 -#define MEMSUFFIX _user -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -/* these access are slower, they must be as rare as possible */ -#define ACCESS_TYPE 2 -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ldub(p) ldub_data(p) -#define ldsb(p) ldsb_data(p) -#define lduw(p) lduw_data(p) -#define ldsw(p) ldsw_data(p) -#define ldl(p) ldl_data(p) -#define ldq(p) ldq_data(p) - -#define stb(p, v) stb_data(p, v) -#define stw(p, v) stw_data(p, v) -#define stl(p, v) stl_data(p, v) -#define stq(p, v) stq_data(p, v) - +#include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ static inline void env_to_regs(void) diff --git a/target-ppc/exec.h b/target-ppc/exec.h index 9e89880011..3ef0968bc3 100644 --- a/target-ppc/exec.h +++ b/target-ppc/exec.h @@ -51,73 +51,8 @@ static inline uint32_t rotl (uint32_t i, int n) return ((i << n) | (i >> (32 - n))); } -/* XXX: move that to a generic header */ #if !defined(CONFIG_USER_ONLY) - -#define ldul_user ldl_user -#define ldul_kernel ldl_kernel - -#define ACCESS_TYPE 0 -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ACCESS_TYPE 1 -#define MEMSUFFIX _user -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -/* these access are slower, they must be as rare as possible */ -#define ACCESS_TYPE 2 -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ldub(p) ldub_data(p) -#define ldsb(p) ldsb_data(p) -#define lduw(p) lduw_data(p) -#define ldsw(p) ldsw_data(p) -#define ldl(p) ldl_data(p) -#define ldq(p) ldq_data(p) - -#define stb(p, v) stb_data(p, v) -#define stw(p, v) stw_data(p, v) -#define stl(p, v) stl_data(p, v) -#define stq(p, v) stq_data(p, v) - +#include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ void do_raise_exception_err (uint32_t exception, int error_code); diff --git a/target-sparc/exec.h b/target-sparc/exec.h index 5f48ba8e6a..1b67ef4bf6 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -83,71 +83,7 @@ void do_rdpsr(); /* XXX: move that to a generic header */ #if !defined(CONFIG_USER_ONLY) - -#define ldul_user ldl_user -#define ldul_kernel ldl_kernel - -#define ACCESS_TYPE 0 -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ACCESS_TYPE 1 -#define MEMSUFFIX _user -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -/* these access are slower, they must be as rare as possible */ -#define ACCESS_TYPE 2 -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "softmmu_header.h" - -#define DATA_SIZE 2 -#include "softmmu_header.h" - -#define DATA_SIZE 4 -#include "softmmu_header.h" - -#define DATA_SIZE 8 -#include "softmmu_header.h" -#undef ACCESS_TYPE -#undef MEMSUFFIX - -#define ldub(p) ldub_data(p) -#define ldsb(p) ldsb_data(p) -#define lduw(p) lduw_data(p) -#define ldsw(p) ldsw_data(p) -#define ldl(p) ldl_data(p) -#define ldq(p) ldq_data(p) - -#define stb(p, v) stb_data(p, v) -#define stw(p, v) stw_data(p, v) -#define stl(p, v) stl_data(p, v) -#define stq(p, v) stq_data(p, v) - +#include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ static inline void env_to_regs(void) |