]> git.proxmox.com Git - qemu.git/commitdiff
Remove all traces of __powerpc__
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Jan 2009 18:39:49 +0000 (18:39 +0000)
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Jan 2009 18:39:49 +0000 (18:39 +0000)
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

15 files changed:
Makefile.target
bsd-user/elfload.c
bswap.h
cache-utils.c
cache-utils.h
cpu-all.h
cpu-exec.c
darwin-user/commpage.c
disas.c
dyngen-exec.h
exec-all.h
fpu/softfloat-native.c
linux-user/elfload.c
qemu-lock.h
tcg/tcg.h

index fcaf4ec67590ec2e4af1341d84b18d94e207dab3..58fe88f4e882149e7f45405287e5b46ded375930 100644 (file)
@@ -98,11 +98,6 @@ HELPER_CFLAGS+=-fomit-frame-pointer
 OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
 endif
 
-ifeq ($(ARCH),ppc)
-CPPFLAGS+= -D__powerpc__
-OP_CFLAGS+= -mlongcall
-endif
-
 ifeq ($(ARCH),sparc)
   CFLAGS+=-ffixed-g2 -ffixed-g3
   OP_CFLAGS+=-fno-delayed-branch -ffixed-i0
index a04552935afa121b931bbc8db72b65889b346881..82f172cc5a890632db3afee5a554601812ebfbf5 100644 (file)
@@ -12,7 +12,7 @@
 #include "qemu.h"
 #include "disas.h"
 
-#ifdef __powerpc64__
+#ifdef _ARCH_PPC64
 #undef ARCH_DLINFO
 #undef ELF_PLATFORM
 #undef ELF_HWCAP
diff --git a/bswap.h b/bswap.h
index 08b77d9377627ebcdfd9feb43f98ab92acc93b76..63b81cc43bd6131c24a1ff1981bdb05c092ccea9 100644 (file)
--- a/bswap.h
+++ b/bswap.h
@@ -134,7 +134,7 @@ CPU_CONVERT(le, 64, uint64_t)
 
 /* unaligned versions (optimized for frequent unaligned accesses)*/
 
-#if defined(__i386__) || defined(__powerpc__)
+#if defined(__i386__) || defined(_ARCH_PPC)
 
 #define cpu_to_le16wu(p, v) cpu_to_le16w(p, v)
 #define cpu_to_le32wu(p, v) cpu_to_le32w(p, v)
index 7df1fcf51c4587cb91f6a0e5ef6f2db4f97f2535..b37ddd4992f8b7660c52dd8c224882c14b963e8f 100644 (file)
@@ -1,6 +1,6 @@
 #include "cache-utils.h"
 
-#if defined HOST_PPC || defined HOST_PPC64
+#if defined(_ARCH_PPC)
 struct qemu_cache_conf qemu_cache_conf = {
     .dcache_bsize = 16,
     .icache_bsize = 16
@@ -68,4 +68,4 @@ void qemu_cache_utils_init(char **envp)
 }
 #endif
 
-#endif /* HOST_PPC || HOST_PPC64  */
+#endif /* _ARCH_PPC */
index 8847dbbf7b067a46ab4de7958eec71ab3baace3b..b45fde44e85490c981006e48fb10613d6d06e6d0 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef QEMU_CACHE_UTILS_H
 #define QEMU_CACHE_UTILS_H
 
-#include "config-host.h"
-
-#if defined HOST_PPC || defined HOST_PPC64
+#if defined(_ARCH_PPC)
 struct qemu_cache_conf {
     unsigned long dcache_bsize;
     unsigned long icache_bsize;
index cceaefd4b4fb5c5ab50957015f4a6a2f3e7140c7..32b7a6688bc37263b9e89bc290c701c4a93d7239 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -229,7 +229,7 @@ static inline void stb_p(void *ptr, int v)
 /* conservative code for little endian unaligned accesses */
 static inline int lduw_le_p(const void *ptr)
 {
-#ifdef __powerpc__
+#ifdef _ARCH_PPC
     int val;
     __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
     return val;
@@ -241,7 +241,7 @@ static inline int lduw_le_p(const void *ptr)
 
 static inline int ldsw_le_p(const void *ptr)
 {
-#ifdef __powerpc__
+#ifdef _ARCH_PPC
     int val;
     __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
     return (int16_t)val;
@@ -253,7 +253,7 @@ static inline int ldsw_le_p(const void *ptr)
 
 static inline int ldl_le_p(const void *ptr)
 {
-#ifdef __powerpc__
+#ifdef _ARCH_PPC
     int val;
     __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr));
     return val;
@@ -274,7 +274,7 @@ static inline uint64_t ldq_le_p(const void *ptr)
 
 static inline void stw_le_p(void *ptr, int v)
 {
-#ifdef __powerpc__
+#ifdef _ARCH_PPC
     __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*(uint16_t *)ptr) : "r" (v), "r" (ptr));
 #else
     uint8_t *p = ptr;
@@ -285,7 +285,7 @@ static inline void stw_le_p(void *ptr, int v)
 
 static inline void stl_le_p(void *ptr, int v)
 {
-#ifdef __powerpc__
+#ifdef _ARCH_PPC
     __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
 #else
     uint8_t *p = ptr;
@@ -985,7 +985,7 @@ void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
 /*******************************************/
 /* host CPU ticks (if available) */
 
-#if defined(__powerpc__)
+#if defined(_ARCH_PPC)
 
 static inline uint32_t get_tbl(void)
 {
index f574877e6f7de3e078205339c595b1318c844d48..07ddd0eda27b7442e59a972c88a2fcfb11ada663 100644 (file)
@@ -1218,7 +1218,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                              &uc->uc_sigmask, puc);
 }
 
-#elif defined(__powerpc__)
+#elif defined(_ARCH_PPC)
 
 /***********************************************************************
  * signal context platform-specific definitions
index 2b920b5285e36d3568cfcdddd9a059a99954a0af..58f429c194d07f2b7f753f0986d9c8b3b38b8fff 100644 (file)
@@ -181,7 +181,7 @@ static inline void install_commpage_backdoor_for_entry(struct commpage_entry ent
  */
 void commpage_init(void)
 {
-#if (defined(__i386__) ^ defined(TARGET_I386)) || (defined(__powerpc__) ^ defined(TARGET_PPC))
+#if (defined(__i386__) ^ defined(TARGET_I386)) || (defined(_ARCH_PPC) ^ defined(TARGET_PPC))
     int i;
     void * commpage = (void *)target_mmap( COMMPAGE_START, COMMPAGE_SIZE,
                            PROT_WRITE | PROT_READ, MAP_ANONYMOUS | MAP_FIXED, -1, 0);
diff --git a/disas.c b/disas.c
index 715c7d2d6cbf4d124c47a7f84f18ff67d3846edf..83c8826b4c9e391a6041afa4f0b22790ab5c1851 100644 (file)
--- a/disas.c
+++ b/disas.c
@@ -250,7 +250,7 @@ void disas(FILE *out, void *code, unsigned long size)
 #elif defined(__x86_64__)
     disasm_info.mach = bfd_mach_x86_64;
     print_insn = print_insn_i386;
-#elif defined(__powerpc__)
+#elif defined(_ARCH_PPC)
     print_insn = print_insn_ppc;
 #elif defined(__alpha__)
     print_insn = print_insn_alpha;
index 11e6dea357e10ad29abd172033cdd31a6013c444..4693eac83697b81822bff0d67e07669c37535409 100644 (file)
@@ -41,7 +41,7 @@ typedef unsigned int uint32_t;
 // Linux/Sparc64 defines uint64_t
 #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
 /* XXX may be done for all 64 bits targets ? */
-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__)
+#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
 typedef unsigned long uint64_t;
 #else
 typedef unsigned long long uint64_t;
@@ -58,7 +58,7 @@ typedef signed short int16_t;
 typedef signed int int32_t;
 // Linux/Sparc64 defines int64_t
 #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__)
+#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
 typedef signed long int64_t;
 #else
 typedef signed long long int64_t;
@@ -105,7 +105,7 @@ extern int printf(const char *, ...);
 #define AREG3 "r13"
 //#define AREG4 "rbp"
 //#define AREG5 "rbx"
-#elif defined(__powerpc__)
+#elif defined(_ARCH_PPC)
 #define AREG0 "r27"
 #define AREG1 "r24"
 #define AREG2 "r25"
index 4b828c591b6b0c0c127ab4f4021f86bebdc9ebfa..dbfe5bf89c4a4589ef8c09956546f711d21cd2fd 100644 (file)
@@ -117,7 +117,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr,
 #define CODE_GEN_AVG_BLOCK_SIZE 64
 #endif
 
-#if defined(__powerpc__) || defined(__x86_64__) || defined(__arm__)
+#if defined(_ARCH_PPC) || defined(__x86_64__) || defined(__arm__)
 #define USE_DIRECT_JUMP
 #endif
 #if defined(__i386__) && !defined(_WIN32)
@@ -192,7 +192,7 @@ extern int code_gen_max_blocks;
 
 #if defined(USE_DIRECT_JUMP)
 
-#if defined(__powerpc__)
+#if defined(_ARCH_PPC)
 extern void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr);
 #define tb_set_jmp_target1 ppc_tb_set_jmp_target
 #elif defined(__i386__) || defined(__x86_64__)
index 7273ae5b4f2270b060c26d876879942266d10c66..9eba03540b66982dcade0d61254c4cc8da8689e2 100644 (file)
@@ -51,7 +51,7 @@ ldexpl(long double x, int n) {
 #endif
 #endif
 
-#if defined(__powerpc__)
+#if defined(_ARCH_PPC)
 
 /* correct (but slow) PowerPC rint() (glibc version is incorrect) */
 double qemu_rint(double x)
index 34334045dfd6ed371b4355b36254ed95f1de8de5..ba1d63106380105bf884dd2ea88c1480d1bb6203 100644 (file)
@@ -12,7 +12,7 @@
 #include "qemu.h"
 #include "disas.h"
 
-#ifdef __powerpc64__
+#ifdef _ARCH_PPC64
 #undef ARCH_DLINFO
 #undef ELF_PLATFORM
 #undef ELF_HWCAP
index afd2d5f20c2ecf2260938cf44abbf17b879db52b..26661baae33f192f20329f88ec80c7fc5fc1b7b6 100644 (file)
@@ -58,7 +58,7 @@ static inline void resetlock (spinlock_t *p)
 
 #endif
 
-#if defined(__powerpc__)
+#if defined(_ARCH_PPC)
 static inline int testandset (int *p)
 {
     int ret;
index e83073b0340e6bbceed813cadb0dc7efb2fc6c38..323cc52c1c5ee223814c50af74ba6dc6fa2785a3 100644 (file)
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -457,7 +457,7 @@ uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2);
 uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2);
 
 extern uint8_t code_gen_prologue[];
-#if defined(__powerpc__) && !defined(__powerpc64__)
+#if defined(_ARCH_PPC) && !defined(_ARCH_PPC64)
 #define tcg_qemu_tb_exec(tb_ptr) \
     ((long REGPARM __attribute__ ((longcall)) (*)(void *))code_gen_prologue)(tb_ptr)
 #else