[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] CONFIG_MMU_MAP powerpc host support

From: Laurent Amon
Subject: Re: [Qemu-devel] [PATCH] CONFIG_MMU_MAP powerpc host support
Date: Tue, 28 Dec 2004 00:43:00 +0100

On 27 déc. 04, at 22:41, Pierre d'Herbemont wrote:
So you'll have to write asm code which is platform independent. I think the best way to do that is simply to use the C Preprocessor, and define constant string for registers names, for instance :

#ifdef __powerpc__
/* asm("addis r4, %3, ha16(%4)"); */
asm (ppc_asm_4(addis, ppc_r4, "%3", ppc_high("%4")) "\n");

Merci Pierre,

That looks pretty heavy, though, and I don't think that the result would be very easy to read.

For now, there are only 28 lines impacted so I'lll settle with duplicating them for the purpose of testing this patch. No tonight, though, tomorrow's a working day and it's late already.

In the long run, if we get to do more powerpc asm for optimization, I would rather settle on one syntax and use a bit of perl in the making process to transform it if necessary.

Thanks again,


reply via email to

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