Stop detecting 32-bit PPC host as supported. See previous commit
for rationale.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
configure | 12 ++----------
include/qemu/host-utils.h | 2 +-
include/qemu/timer.h | 13 +------------
disas/disas-host.c | 4 +---
util/cacheflush.c | 4 ++--
5 files changed, 7 insertions(+), 28 deletions(-)
diff --git a/configure b/configure
index ce76a00aff1..8205c8df599 100755
--- a/configure
+++ b/configure
@@ -391,15 +391,12 @@ elif check_define __sparc__ ; then
else
cpu="sparc"
fi
-elif check_define _ARCH_PPC ; then
- if check_define _ARCH_PPC64 ; then
+elif check_define _ARCH_PPC64 ; then
if check_define _LITTLE_ENDIAN ; then
cpu="ppc64le"
else
cpu="ppc64"
fi
- else
- cpu="ppc"
fi
elif check_define __mips__ ; then
if check_define __mips64 ; then
@@ -479,11 +476,6 @@ case "$cpu" in
linux_arch=mips
;;
- ppc)
- host_arch=ppc
- linux_arch=powerpc
- CPU_CFLAGS="-m32"
- ;;
ppc64)
host_arch=ppc64
linux_arch=powerpc
@@ -1477,7 +1469,7 @@ probe_target_compiler() {
container_image=debian-all-test-cross
container_cross_prefix=mips64-linux-gnuabi64-
;;
- ppc|ppc64|ppc64le)
+ ppc64|ppc64le)
container_image=debian-all-test-cross
container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
;;
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index dd558589cb5..22d440287f1 100644
--- a/include/qemu/host-utils.h
+++ b/include/qemu/host-utils.h
@@ -806,7 +806,7 @@ static inline uint64_t udiv_qrnnd(uint64_t *r, uint64_t n1,
asm("dlgr %0, %1" : "+r"(n) : "r"(d));
*r = n >> 64;
return n;
-#elif defined(_ARCH_PPC64) && defined(_ARCH_PWR7)
+#elif defined(_ARCH_PWR7)
/* From Power ISA 2.06, programming note for divdeu. */
uint64_t q1, q2, Q, r1, r2, R;
asm("divdeu %0,%2,%4; divdu %1,%3,%4"
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index abd2204f3be..6c15acebbc0 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -850,12 +850,11 @@ static inline int64_t get_clock(void)
/*******************************************/
/* host CPU ticks (if available) */
-#if defined(_ARCH_PPC)
+#if defined(_ARCH_PPC64)
static inline int64_t cpu_get_host_ticks(void)
{
int64_t retval;
-#ifdef _ARCH_PPC64
/* This reads timebase in one 64bit go and includes Cell workaround from:
http://ozlabs.org/pipermail/linuxppc-dev/2006-October/027052.html
*/
@@ -863,16 +862,6 @@ static inline int64_t cpu_get_host_ticks(void)
"cmpwi %0,0\n\t"
"beq- $-8"
: "=r" (retval));
-#else
- /* http://ozlabs.org/pipermail/linuxppc-dev/1999-October/003889.html */
- unsigned long junk;
- __asm__ __volatile__ ("mfspr %1,269\n\t" /* mftbu */
- "mfspr %L0,268\n\t" /* mftb */
- "mfspr %0,269\n\t" /* mftbu */
- "cmpw %0,%1\n\t"
- "bne $-16"
- : "=r" (retval), "=r" (junk));
-#endif
return retval;
}
diff --git a/disas/disas-host.c b/disas/disas-host.c
index 8146fafe804..4b06f41fa6c 100644
--- a/disas/disas-host.c
+++ b/disas/disas-host.c
@@ -56,11 +56,9 @@ static void initialize_debug_host(CPUDebug *s)
s->info.cap_mode = CS_MODE_64;
s->info.cap_insn_unit = 1;
s->info.cap_insn_split = 8;
-#elif defined(_ARCH_PPC)
+#elif defined(_ARCH_PPC64)
s->info.cap_arch = CS_ARCH_PPC;
-# ifdef _ARCH_PPC64
s->info.cap_mode = CS_MODE_64;
-# endif
#elif defined(__riscv)
#if defined(_ILP32) || (__riscv_xlen == 32)
s->info.print_insn = print_insn_riscv32;
diff --git a/util/cacheflush.c b/util/cacheflush.c
index 17c58918de6..69c9614e2c9 100644
--- a/util/cacheflush.c
+++ b/util/cacheflush.c
@@ -153,7 +153,7 @@ static void arch_cache_info(int *isize, int *dsize)
}
}
-#elif defined(_ARCH_PPC) && defined(__linux__)
+#elif defined(_ARCH_PPC64) && defined(__linux__)
# include "elf.h"
static void arch_cache_info(int *isize, int *dsize)
@@ -187,7 +187,7 @@ static void fallback_cache_info(int *isize, int *dsize)
} else if (*dsize) {
*isize = *dsize;
} else {
-#if defined(_ARCH_PPC)
+#if defined(_ARCH_PPC64)
/*
* For PPC, we're going to use the cache sizes computed for
* flush_idcache_range. Which means that we must use the
--
2.51.0
© 2016 - 2025 Red Hat, Inc.