From: Pierre d'Herbemont <stegefin@free.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Patch] target-ppc mtcrf instruction not recognized
Date: Tue, 17 May 2005 22:17:40 +0200 [thread overview]
Message-ID: <c2eb69024f6d14826e17cba15f42d11a@free.fr> (raw)
In-Reply-To: <1116230086.5095.107.camel@gaston>
On 16 mai 05, at 09:54, Benjamin Herrenschmidt wrote:
>
>> OK, I did put this in my working repository and I'll submit this to
>> Fabrice.
>> Please try to do this change to check if other bits need to be relax
>> or
>> not:
>>
>> Index: target-ppc/translate.c
>> ===================================================================
>> RCS file: /cvsroot/qemu/qemu/target-ppc/translate.c,v
>> retrieving revision 1.31
>> diff -u -r1.31 translate.c
>> --- target-ppc/translate.c 12 May 2005 18:46:11 -0000 1.31
>> +++ target-ppc/translate.c 14 May 2005 17:14:35 -0000
>> @@ -2123,7 +2123,7 @@
>> }
>>
>> /* mtcrf */
>> -GEN_HANDLER(mtcrf, 0x1F, 0x10, 0x04, 0x00100801, PPC_MISC)
>> +GEN_HANDLER(mtcrf, 0x1F, 0x10, 0x04, 0x00000801, PPC_MISC)
>> {
>> gen_op_load_gpr_T0(rS(ctx->opcode));
>> gen_op_store_cr(CRM(ctx->opcode));
>>
I've tested it: it works fine as expected.
>> And maybe someone should fill an Apple bug report to tell them their
>> as
>> is buggy ;-)
>
> It is definitely a bug in Apple assembler I would say, so I suggest you
> add a comment in the above patch in order to avoid somebody later on
> "fixing" your mask :)
I thought it was, but it seems to be not so buggy ;)
I have had a look at the Apple's as source code of Darwin 8.0 (10.4)
[1] and I have found an interesting comment :
/*
* If this is the mtcrf opcode (0x7c000120) and val is not zero and
* has exactly one bit set then use the new form of the mtcrf
* opcode. This has bit 0x00100000 set and the FXM field is a bit
* mask. Else use the old form without bit 0x00100000 set.
*/
I don't know what they are refering to, but that may have been
introduced by the PowerPC 970 or an other new PPC, since it was not
present on the Mac OS X 10.2's as [2].
Pierre.
[1] http://darwinsource.opendarwin.org/10.4/cctools-576/as/ppc.c
[2] http://darwinsource.opendarwin.org/10.2/cctools-435/as/ppc.c
next prev parent reply other threads:[~2005-05-17 22:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-14 17:20 [Qemu-devel] [Patch] target-ppc mtcrf instruction not recognized Pierre d'Herbemont
2005-05-14 18:15 ` J. Mayer
2005-05-14 19:03 ` Pierre d'Herbemont
2005-05-15 12:00 ` J. Mayer
2005-05-16 7:54 ` Benjamin Herrenschmidt
2005-05-17 20:17 ` Pierre d'Herbemont [this message]
2005-05-17 21:10 ` J. Mayer
2005-05-18 9:06 ` Herbert Poetzl
2005-05-18 10:28 ` J. Mayer
[not found] ` <da63183705051610384e40c3de@mail.gmail.com>
[not found] ` <da631837050516110638c65163@mail.gmail.com>
2005-05-16 21:14 ` J. Mayer
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=c2eb69024f6d14826e17cba15f42d11a@free.fr \
--to=stegefin@free.fr \
--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).