Commit e58ffeb322e2ef88cc23e9505366418bf793316d
1 parent
bc575e95
Remove all traces of __powerpc__
According to $GCC/gcc/config/rs6000/rs6000-c.c _ARCH_PPC is the ubiquitous define which should be used to test whether gcc targets PowerPC, on 64bit platforms _ARCH_PPC64 will be also defined. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6301 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
15 changed files
with
23 additions
and
30 deletions
Makefile.target
| ... | ... | @@ -98,11 +98,6 @@ HELPER_CFLAGS+=-fomit-frame-pointer |
| 98 | 98 | OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer |
| 99 | 99 | endif |
| 100 | 100 | |
| 101 | -ifeq ($(ARCH),ppc) | |
| 102 | -CPPFLAGS+= -D__powerpc__ | |
| 103 | -OP_CFLAGS+= -mlongcall | |
| 104 | -endif | |
| 105 | - | |
| 106 | 101 | ifeq ($(ARCH),sparc) |
| 107 | 102 | CFLAGS+=-ffixed-g2 -ffixed-g3 |
| 108 | 103 | OP_CFLAGS+=-fno-delayed-branch -ffixed-i0 | ... | ... |
bsd-user/elfload.c
bswap.h
| ... | ... | @@ -134,7 +134,7 @@ CPU_CONVERT(le, 64, uint64_t) |
| 134 | 134 | |
| 135 | 135 | /* unaligned versions (optimized for frequent unaligned accesses)*/ |
| 136 | 136 | |
| 137 | -#if defined(__i386__) || defined(__powerpc__) | |
| 137 | +#if defined(__i386__) || defined(_ARCH_PPC) | |
| 138 | 138 | |
| 139 | 139 | #define cpu_to_le16wu(p, v) cpu_to_le16w(p, v) |
| 140 | 140 | #define cpu_to_le32wu(p, v) cpu_to_le32w(p, v) | ... | ... |
cache-utils.c
| 1 | 1 | #include "cache-utils.h" |
| 2 | 2 | |
| 3 | -#if defined HOST_PPC || defined HOST_PPC64 | |
| 3 | +#if defined(_ARCH_PPC) | |
| 4 | 4 | struct qemu_cache_conf qemu_cache_conf = { |
| 5 | 5 | .dcache_bsize = 16, |
| 6 | 6 | .icache_bsize = 16 |
| ... | ... | @@ -68,4 +68,4 @@ void qemu_cache_utils_init(char **envp) |
| 68 | 68 | } |
| 69 | 69 | #endif |
| 70 | 70 | |
| 71 | -#endif /* HOST_PPC || HOST_PPC64 */ | |
| 71 | +#endif /* _ARCH_PPC */ | ... | ... |
cache-utils.h
cpu-all.h
| ... | ... | @@ -229,7 +229,7 @@ static inline void stb_p(void *ptr, int v) |
| 229 | 229 | /* conservative code for little endian unaligned accesses */ |
| 230 | 230 | static inline int lduw_le_p(const void *ptr) |
| 231 | 231 | { |
| 232 | -#ifdef __powerpc__ | |
| 232 | +#ifdef _ARCH_PPC | |
| 233 | 233 | int val; |
| 234 | 234 | __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr)); |
| 235 | 235 | return val; |
| ... | ... | @@ -241,7 +241,7 @@ static inline int lduw_le_p(const void *ptr) |
| 241 | 241 | |
| 242 | 242 | static inline int ldsw_le_p(const void *ptr) |
| 243 | 243 | { |
| 244 | -#ifdef __powerpc__ | |
| 244 | +#ifdef _ARCH_PPC | |
| 245 | 245 | int val; |
| 246 | 246 | __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr)); |
| 247 | 247 | return (int16_t)val; |
| ... | ... | @@ -253,7 +253,7 @@ static inline int ldsw_le_p(const void *ptr) |
| 253 | 253 | |
| 254 | 254 | static inline int ldl_le_p(const void *ptr) |
| 255 | 255 | { |
| 256 | -#ifdef __powerpc__ | |
| 256 | +#ifdef _ARCH_PPC | |
| 257 | 257 | int val; |
| 258 | 258 | __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr)); |
| 259 | 259 | return val; |
| ... | ... | @@ -274,7 +274,7 @@ static inline uint64_t ldq_le_p(const void *ptr) |
| 274 | 274 | |
| 275 | 275 | static inline void stw_le_p(void *ptr, int v) |
| 276 | 276 | { |
| 277 | -#ifdef __powerpc__ | |
| 277 | +#ifdef _ARCH_PPC | |
| 278 | 278 | __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*(uint16_t *)ptr) : "r" (v), "r" (ptr)); |
| 279 | 279 | #else |
| 280 | 280 | uint8_t *p = ptr; |
| ... | ... | @@ -285,7 +285,7 @@ static inline void stw_le_p(void *ptr, int v) |
| 285 | 285 | |
| 286 | 286 | static inline void stl_le_p(void *ptr, int v) |
| 287 | 287 | { |
| 288 | -#ifdef __powerpc__ | |
| 288 | +#ifdef _ARCH_PPC | |
| 289 | 289 | __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr)); |
| 290 | 290 | #else |
| 291 | 291 | uint8_t *p = ptr; |
| ... | ... | @@ -985,7 +985,7 @@ void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size); |
| 985 | 985 | /*******************************************/ |
| 986 | 986 | /* host CPU ticks (if available) */ |
| 987 | 987 | |
| 988 | -#if defined(__powerpc__) | |
| 988 | +#if defined(_ARCH_PPC) | |
| 989 | 989 | |
| 990 | 990 | static inline uint32_t get_tbl(void) |
| 991 | 991 | { | ... | ... |
cpu-exec.c
| ... | ... | @@ -1218,7 +1218,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, |
| 1218 | 1218 | &uc->uc_sigmask, puc); |
| 1219 | 1219 | } |
| 1220 | 1220 | |
| 1221 | -#elif defined(__powerpc__) | |
| 1221 | +#elif defined(_ARCH_PPC) | |
| 1222 | 1222 | |
| 1223 | 1223 | /*********************************************************************** |
| 1224 | 1224 | * signal context platform-specific definitions | ... | ... |
darwin-user/commpage.c
| ... | ... | @@ -181,7 +181,7 @@ static inline void install_commpage_backdoor_for_entry(struct commpage_entry ent |
| 181 | 181 | */ |
| 182 | 182 | void commpage_init(void) |
| 183 | 183 | { |
| 184 | -#if (defined(__i386__) ^ defined(TARGET_I386)) || (defined(__powerpc__) ^ defined(TARGET_PPC)) | |
| 184 | +#if (defined(__i386__) ^ defined(TARGET_I386)) || (defined(_ARCH_PPC) ^ defined(TARGET_PPC)) | |
| 185 | 185 | int i; |
| 186 | 186 | void * commpage = (void *)target_mmap( COMMPAGE_START, COMMPAGE_SIZE, |
| 187 | 187 | PROT_WRITE | PROT_READ, MAP_ANONYMOUS | MAP_FIXED, -1, 0); | ... | ... |
disas.c
| ... | ... | @@ -250,7 +250,7 @@ void disas(FILE *out, void *code, unsigned long size) |
| 250 | 250 | #elif defined(__x86_64__) |
| 251 | 251 | disasm_info.mach = bfd_mach_x86_64; |
| 252 | 252 | print_insn = print_insn_i386; |
| 253 | -#elif defined(__powerpc__) | |
| 253 | +#elif defined(_ARCH_PPC) | |
| 254 | 254 | print_insn = print_insn_ppc; |
| 255 | 255 | #elif defined(__alpha__) |
| 256 | 256 | print_insn = print_insn_alpha; | ... | ... |
dyngen-exec.h
| ... | ... | @@ -41,7 +41,7 @@ typedef unsigned int uint32_t; |
| 41 | 41 | // Linux/Sparc64 defines uint64_t |
| 42 | 42 | #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) |
| 43 | 43 | /* XXX may be done for all 64 bits targets ? */ |
| 44 | -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__) | |
| 44 | +#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) | |
| 45 | 45 | typedef unsigned long uint64_t; |
| 46 | 46 | #else |
| 47 | 47 | typedef unsigned long long uint64_t; |
| ... | ... | @@ -58,7 +58,7 @@ typedef signed short int16_t; |
| 58 | 58 | typedef signed int int32_t; |
| 59 | 59 | // Linux/Sparc64 defines int64_t |
| 60 | 60 | #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) |
| 61 | -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__) | |
| 61 | +#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) | |
| 62 | 62 | typedef signed long int64_t; |
| 63 | 63 | #else |
| 64 | 64 | typedef signed long long int64_t; |
| ... | ... | @@ -105,7 +105,7 @@ extern int printf(const char *, ...); |
| 105 | 105 | #define AREG3 "r13" |
| 106 | 106 | //#define AREG4 "rbp" |
| 107 | 107 | //#define AREG5 "rbx" |
| 108 | -#elif defined(__powerpc__) | |
| 108 | +#elif defined(_ARCH_PPC) | |
| 109 | 109 | #define AREG0 "r27" |
| 110 | 110 | #define AREG1 "r24" |
| 111 | 111 | #define AREG2 "r25" | ... | ... |
exec-all.h
| ... | ... | @@ -117,7 +117,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr, |
| 117 | 117 | #define CODE_GEN_AVG_BLOCK_SIZE 64 |
| 118 | 118 | #endif |
| 119 | 119 | |
| 120 | -#if defined(__powerpc__) || defined(__x86_64__) || defined(__arm__) | |
| 120 | +#if defined(_ARCH_PPC) || defined(__x86_64__) || defined(__arm__) | |
| 121 | 121 | #define USE_DIRECT_JUMP |
| 122 | 122 | #endif |
| 123 | 123 | #if defined(__i386__) && !defined(_WIN32) |
| ... | ... | @@ -192,7 +192,7 @@ extern int code_gen_max_blocks; |
| 192 | 192 | |
| 193 | 193 | #if defined(USE_DIRECT_JUMP) |
| 194 | 194 | |
| 195 | -#if defined(__powerpc__) | |
| 195 | +#if defined(_ARCH_PPC) | |
| 196 | 196 | extern void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr); |
| 197 | 197 | #define tb_set_jmp_target1 ppc_tb_set_jmp_target |
| 198 | 198 | #elif defined(__i386__) || defined(__x86_64__) | ... | ... |
fpu/softfloat-native.c
linux-user/elfload.c
qemu-lock.h
tcg/tcg.h
| ... | ... | @@ -457,7 +457,7 @@ uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2); |
| 457 | 457 | uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2); |
| 458 | 458 | |
| 459 | 459 | extern uint8_t code_gen_prologue[]; |
| 460 | -#if defined(__powerpc__) && !defined(__powerpc64__) | |
| 460 | +#if defined(_ARCH_PPC) && !defined(_ARCH_PPC64) | |
| 461 | 461 | #define tcg_qemu_tb_exec(tb_ptr) \ |
| 462 | 462 | ((long REGPARM __attribute__ ((longcall)) (*)(void *))code_gen_prologue)(tb_ptr) |
| 463 | 463 | #else | ... | ... |