qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [4932] Preliminary PPC64/Linux host support


From: Andreas Färber
Subject: Re: [Qemu-devel] [4932] Preliminary PPC64/Linux host support
Date: Sat, 26 Jul 2008 15:08:01 +0200


Am 25.07.2008 um 20:18 schrieb malc:

On Thu, 24 Jul 2008, C.W. Betts wrote:

Building it under OS X 10.5.4 doesn't work. After editing the config-host files, I get the following: In file included from /Users/cwbetts/makestuff/qemu-allmac/src/exec- all.h:320,
              from /Users/cwbetts/makestuff/qemu-allmac/src/vl.c:136:
/Users/cwbetts/makestuff/qemu-allmac/src/qemu-lock.h:216:2: error: #error unimplemented CPU support

After adding
#define __powerpc__ 1
#define __powerpc64__ 1

I don't think it's is a good idea to define these as such, it may confuse other software. You should check the places where they are used and add appropriate checks for either __ppc__ or __ppc64__ respectively (they are never defined at the same time, contrary to Linux).

In TCG Spotlight came up only with this:

diff --git a/tcg/tcg.h b/tcg/tcg.h
index bc5b902..860bce9 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -413,7 +413,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(__powerpc__) || defined(__ppc__)) && ! defined(__powerpc64__)
 #define tcg_qemu_tb_exec(tb_ptr) \
((long REGPARM __attribute__ ((longcall)) (*)(void *))code_gen_prologue)(tb
 #else

and it shouldn't affect ppc64. Not sure if it's needed at all for OSX? What's it supposed to change?

It chokes up under
In file included from /usr/include/inttypes.h:255,
from /Users/cwbetts/makestuff/qemu-allmac/src/cpu- defs.h:29, from /Users/cwbetts/makestuff/qemu-allmac/src/target- i386/exec.h:30, from /Users/cwbetts/makestuff/qemu-allmac/src/cpu- exec.c:22: /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h:35: error: conflicting types for ?int64_t? /Users/cwbetts/makestuff/qemu-allmac/src/dyngen-exec.h:59: error: previous declaration of ?int64_t? was here /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h:55: error: conflicting types for ?uint64_t? /Users/cwbetts/makestuff/qemu-allmac/src/dyngen-exec.h:42: error: previous declaration of ?uint64_t? was here
make: *** [cpu-exec.o] Error 1

Uh, weird,

Well, afaik dyngen didn't have support for ppc64...

what are [u]int64_t are defined to on darwin?

uint64_t is defined to u_int64_t (stdint.h), which is defined to unsigned long long (ppc/types.h).
int64_t is defined to long long (ppc/types.h).

I know that this isn't exactly designed for PPC Macs, but the tcg files compiled without a problem.

What gives you that idea?

He probably meant designed for PPC Mac OS X - you said so, and it doesn't work yet. See my patch, there are currently numbers hardcoded for Linux.

Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]