From 5270589032f450ae7c3448730855aa18ff68ccff Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 10 Mar 2010 14:33:23 -0800 Subject: Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h. Removes a set of ifdefs from exec.c. Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other than Alpha. This will be used for page_find_alloc, which is supposed to be using virtual addresses in the first place. Signed-off-by: Richard Henderson --- target-ppc/cpu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'target-ppc') diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 63aeb86..cecc6e2 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -29,6 +29,20 @@ #define TARGET_LONG_BITS 64 #define TARGET_PAGE_BITS 12 +/* Note that the official physical address space bits is 62-M where M + is implementation dependent. I've not looked up M for the set of + cpus we emulate at the system level. */ +#define TARGET_PHYS_ADDR_SPACE_BITS 62 + +/* Note that the PPC environment architecture talks about 80 bit virtual + addresses, with segmentation. Obviously that's not all visible to a + single process, which is all we're concerned with here. */ +#ifdef TARGET_ABI32 +# define TARGET_VIRT_ADDR_SPACE_BITS 32 +#else +# define TARGET_VIRT_ADDR_SPACE_BITS 64 +#endif + #else /* defined (TARGET_PPC64) */ /* PowerPC 32 definitions */ #define TARGET_LONG_BITS 32 @@ -50,6 +64,9 @@ #define TARGET_PAGE_BITS 12 #endif /* defined(TARGET_PPCEMB) */ +#define TARGET_PHYS_ADDR_SPACE_BITS 32 +#define TARGET_VIRT_ADDR_SPACE_BITS 32 + #endif /* defined (TARGET_PPC64) */ #define CPUState struct CPUPPCState -- cgit v1.1