From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4932] Preliminary PPC64/Linux host support
Date: Sat, 26 Jul 2008 22:54:15 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.64.0807262249240.2328@linmac.oyster.ru> (raw)
In-Reply-To: <0D03767C-CA27-40D9-B390-04F6BECC9603@web.de>
On Sat, 26 Jul 2008, Andreas F?rber wrote:
>
> 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).
You are replying to both me and C.W. Betts this is somewhat confusing.
> 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...
No that's not what i find weird, the weird part is darwin elects to use
(unsigned) long long for (u)int64_t while Linux uses plain longs.
>> 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.
It's not just about numbers, last time i looked (cursory) the ABIs where
a lot different (PPC32 case) just changing the numbers wont get one very
far i think.
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2008-07-26 18:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 19:17 [Qemu-devel] [4932] Preliminary PPC64/Linux host support malc
2008-07-24 6:01 ` René Rebe
2008-07-24 17:41 ` malc
2008-07-24 18:42 ` Andreas Färber
2008-07-25 8:41 ` René Rebe
2008-07-25 18:15 ` malc
2008-07-26 19:32 ` René Rebe
2008-07-27 18:17 ` malc
[not found] ` <1964D914-95C1-4A3E-AE40-2DE082D40C24@hotmail.com>
2008-07-24 23:33 ` C.W. Betts
2008-07-25 18:18 ` malc
2008-07-26 13:08 ` Andreas Färber
[not found] ` <F41A287D-66CA-42E4-A191-CD5381987301@hotmail.com>
2008-07-26 17:36 ` C.W. Betts
2008-07-26 18:00 ` Andreas Färber
2008-07-26 18:54 ` malc [this message]
2008-07-26 20:42 ` Andreas Färber
2008-07-27 18:14 ` malc
2008-07-29 16:28 ` [Qemu-devel] Mac OS X PPC host support (was: [4932] Preliminary PPC64/Linux host support) Andreas Färber
2008-07-29 20:23 ` malc
2008-07-30 18:45 ` Blue Swirl
2008-07-31 17:15 ` malc
2008-07-31 18:57 ` malc
2008-07-31 21:50 ` Andreas Färber
2008-08-01 18:52 ` malc
2008-08-02 21:29 ` Andreas Färber
2008-08-03 18:56 ` malc
2008-08-02 16:35 ` Andreas Färber
[not found] ` <E3E8B39E-1924-465D-AA4A-9250D835C932@hotmail.com>
2008-08-02 19:43 ` C.W. Betts
2008-07-26 13:39 ` [Qemu-devel] [4932] Preliminary PPC64/Linux host support Andreas Färber
[not found] ` <1D9DD99A-96CE-4570-B8EE-428CDBAE5FE3@hotmail.com>
2008-07-26 17:13 ` C.W. Betts
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=Pine.LNX.4.64.0807262249240.2328@linmac.oyster.ru \
--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).