qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6301] Remove all traces of __powerpc__
Date: Wed, 14 Jan 2009 18:39:49 +0000	[thread overview]
Message-ID: <E1LNAeb-0005XV-FF@cvs.savannah.gnu.org> (raw)

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
===================================================================
--- trunk/Makefile.target	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/Makefile.target	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/bsd-user/elfload.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/bsd-user/elfload.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/bswap.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/bswap.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/cache-utils.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/cache-utils.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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 @@
 }
 #endif
 
-#endif /* HOST_PPC || HOST_PPC64  */
+#endif /* _ARCH_PPC */

Modified: trunk/cache-utils.h
===================================================================
--- trunk/cache-utils.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/cache-utils.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/cpu-all.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/cpu-all.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -229,7 +229,7 @@
 /* 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 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 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 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
===================================================================
--- trunk/cpu-exec.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/cpu-exec.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/darwin-user/commpage.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/darwin-user/commpage.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/disas.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/disas.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/dyngen-exec.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/dyngen-exec.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/exec-all.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/exec-all.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/fpu/softfloat-native.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/fpu/softfloat-native.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/linux-user/elfload.c	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/linux-user/elfload.c	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/qemu-lock.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/qemu-lock.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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
===================================================================
--- trunk/tcg/tcg.h	2009-01-14 18:34:22 UTC (rev 6300)
+++ trunk/tcg/tcg.h	2009-01-14 18:39:49 UTC (rev 6301)
@@ -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

                 reply	other threads:[~2009-01-14 18:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LNAeb-0005XV-FF@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).