Changeset 42601 in vbox for trunk/src/recompiler/cpu-all.h
- Timestamp:
- Aug 5, 2012 4:26:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/cpu-all.h
r37702 r42601 774 774 */ 775 775 #if defined(CONFIG_USE_GUEST_BASE) 776 extern u nsigned longguest_base;776 extern uintptr_t guest_base; 777 777 extern int have_guest_base; 778 extern u nsigned longreserved_va;778 extern uintptr_t reserved_va; 779 779 #define GUEST_BASE guest_base 780 780 #define RESERVED_VA reserved_va … … 785 785 786 786 /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ 787 #define g2h(x) ((void *)((u nsigned long)(x) + GUEST_BASE))787 #define g2h(x) ((void *)((uintptr_t)(x) + GUEST_BASE)) 788 788 789 789 #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS … … 791 791 #else 792 792 #define h2g_valid(x) ({ \ 793 u nsigned long __guest = (unsigned long)(x) - GUEST_BASE; \793 uintptr_t __guest = (uintptr_t)(x) - GUEST_BASE; \ 794 794 __guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS); \ 795 795 }) … … 797 797 798 798 #define h2g(x) ({ \ 799 u nsigned long __ret = (unsigned long)(x) - GUEST_BASE; \799 uintptr_t __ret = (uintptr_t)(x) - GUEST_BASE; \ 800 800 /* Check if given address fits target address space */ \ 801 801 assert(h2g_valid(x)); \ … … 809 809 /* NOTE: we use double casts if pointers and target_ulong have 810 810 different sizes */ 811 #define saddr(x) (uint8_t *)( long)(x)812 #define laddr(x) (uint8_t *)( long)(x)811 #define saddr(x) (uint8_t *)(intptr_t)(x) 812 #define laddr(x) (uint8_t *)(intptr_t)(x) 813 813 #endif 814 814 … … 877 877 #define TARGET_PAGE_ALIGN(addr) (((addr) + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK) 878 878 879 /* ??? These should be the larger of u nsigned longand target_ulong. */880 extern unsigned longqemu_real_host_page_size;881 extern unsigned longqemu_host_page_bits;882 extern unsigned longqemu_host_page_size;883 extern u nsigned longqemu_host_page_mask;879 /* ??? These should be the larger of uintptr_t and target_ulong. */ 880 extern size_t qemu_real_host_page_size; 881 extern size_t qemu_host_page_bits; 882 extern size_t qemu_host_page_size; 883 extern uintptr_t qemu_host_page_mask; 884 884 885 885 #define HOST_PAGE_ALIGN(addr) (((addr) + qemu_host_page_size - 1) & qemu_host_page_mask) … … 903 903 904 904 typedef int (*walk_memory_regions_fn)(void *, abi_ulong, 905 abi_ulong, u nsigned long);905 abi_ulong, uintptr_t); 906 906 int walk_memory_regions(void *, walk_memory_regions_fn); 907 907
Note:
See TracChangeset
for help on using the changeset viewer.