[6301] Remove all traces of __powerpc__
Revision: 6301
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6301 Author: malc Date: 2009-01-14 18:39:49 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/Makefile.target
trunk/bsd-user/elfload.c
trunk/bswap.h
trunk/cache-utils.c
trunk/cache-utils.h
trunk/cpu-all.h
trunk/cpu-exec.c
trunk/darwin-user/commpage.c
trunk/disas.c
trunk/dyngen-exec.h
trunk/exec-all.h
trunk/fpu/softfloat-native.c
trunk/linux-user/elfload.c
trunk/qemu-lock.h
trunk/tcg/tcg.h
Modified: trunk/Makefile.target
===================================================================
Makefile.target +0 -5
@@ -98,11 +98,6 @@ 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
Modified: trunk/bsd-user/elfload.c
===================================================================
bsd-user/elfload.c +1 -1
@@ -12,7 +12,7 @@#include "qemu.h" #include "disas.h" -#ifdef __powerpc64__ +#ifdef _ARCH_PPC64#undef ARCH_DLINFO#undef ELF_PLATFORM#undef ELF_HWCAP
Modified: trunk/bswap.h
===================================================================
bswap.h +1 -1
@@ -134,7 +134,7 @@/* 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)
Modified: trunk/cache-utils.c
===================================================================
cache-utils.c +2 -2
@@ -1,6 +1,6 @@#include "cache-utils.h" -#if definedHOST_PPC || definedHOST_PPC64 +#if defined(_ARCH_PPC)struct qemu_cache_conf qemu_cache_conf = { .dcache_bsize =16 , .icache_bsize = 16
@@ -68,4 +68,4 @@ }#endif -#endif /* HOST_PPC || HOST_PPC64 */ +#endif /* _ARCH_PPC */
Modified: trunk/cache-utils.h
===================================================================
cache-utils.h +1 -3
@@ -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;
Modified: trunk/cpu-all.h
===================================================================
cpu-all.h +6 -6
@@ -229,7 +229,7 @@/* conservative code for little endian unaligned accesses */ static inline int lduw_le_p (const void *ptr) { -#ifdef __powerpc__ +#ifdef _ARCH_PPCint val; __asm__ __volatile__ ("lhbrx %0,0,%1" :"=r" (val) :"r" (ptr));return val;
@@ -241,7 +241,7 @@static inline int ldsw_le_p (const void *ptr) { -#ifdef __powerpc__ +#ifdef _ARCH_PPCint val; __asm__ __volatile__ ("lhbrx %0,0,%1" :"=r" (val) :"r" (ptr));return (int16_t )val;
@@ -253,7 +253,7 @@static inline int ldl_le_p (const void *ptr) { -#ifdef __powerpc__ +#ifdef _ARCH_PPCint val; __asm__ __volatile__ ("lwbrx %0,0,%1" :"=r" (val) :"r" (ptr));return val;
@@ -274,7 +274,7 @@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 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 @@/*******************************************/ /* host CPU ticks (if available) */ -#if defined(__powerpc__) +#if defined(_ARCH_PPC)static inline uint32_t get_tbl (void ) {
Modified: trunk/cpu-exec.c
===================================================================
cpu-exec.c +1 -1
@@ -1218,7 +1218,7 @@ &uc->uc_sigmask, puc); } -#elif defined(__powerpc__) +#elif defined(_ARCH_PPC)/*********************************************************************** * signal context platform-specific definitions
Modified: trunk/darwin-user/commpage.c
===================================================================
darwin-user/commpage.c +1 -1
@@ -181,7 +181,7 @@*/ 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 );
Modified: trunk/disas.c
===================================================================
disas.c +1 -1
@@ -250,7 +250,7 @@#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;
Modified: trunk/dyngen-exec.h
===================================================================
dyngen-exec.h +3 -3
@@ -41,7 +41,7 @@// 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 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 @@#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"
Modified: trunk/exec-all.h
===================================================================
exec-all.h +2 -2
@@ -117,7 +117,7 @@#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 @@#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__)
Modified: trunk/fpu/softfloat-native.c
===================================================================
fpu/softfloat-native.c +1 -1
@@ -51,7 +51,7 @@#endif #endif -#if defined(__powerpc__) +#if defined(_ARCH_PPC)/* correct (but slow) PowerPC rint() (glibc version is incorrect) */ double qemu_rint (double x)
Modified: trunk/linux-user/elfload.c
===================================================================
linux-user/elfload.c +1 -1
@@ -12,7 +12,7 @@#include "qemu.h" #include "disas.h" -#ifdef __powerpc64__ +#ifdef _ARCH_PPC64#undef ARCH_DLINFO#undef ELF_PLATFORM#undef ELF_HWCAP
Modified: trunk/qemu-lock.h
===================================================================
qemu-lock.h +1 -1
@@ -58,7 +58,7 @@#endif -#if defined(__powerpc__) +#if defined(_ARCH_PPC)static inline int testandset (int *p) {int ret;
Modified: trunk/tcg/tcg.h
===================================================================
tcg/tcg.h +1 -1
@@ -457,7 +457,7 @@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