[Top][All Lists]

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

Re: [Qemu-devel] [Patch] target-ppc mtcrf instruction not recognized

From: Pierre d'Herbemont
Subject: Re: [Qemu-devel] [Patch] target-ppc mtcrf instruction not recognized
Date: Sat, 14 May 2005 21:03:24 +0200

On 14 mai 05, at 20:15, J. Mayer wrote:

Qemu assume all reserved fields are set to zero, not 1.

PowerPC specifications says: (section 8.1 of PEM)
"Some instructions fields are reserved or must contain a predefined
value as shown in the individual instruction layouts. If a reserved
field does not have all bits cleared, or if a field that must contain a
particular value does not contains that value, the instruction form is
invalid ..."
In section
"Invalid forms result when a bit or openrands is coded incorrectly, for
example, or when a reserved bit (shown as '0') is coded as '1'.
"an attempt to execute an invalid form of an instruction either invokes
the illegal instruction error handler (or program exception) or yields
boundedly-undefined results.

In the case of mtcrf, the PowerPC specification says the bits 11, 21 and
31 (IBM notation) _must_ be zero.
This is what is described in 32 bits PEM as well as 64 bits PEM
(including the latest revision dated on 31/03/2005) and the 740/750
PowerPC user manual (which is the one currently emulated by Qemu).

It would be acceptable to relax the check if it would make MacOS X 10.4
But in this case, only the bit 11 (which causes the problem here) should
be relaxed.
Then, the bit mask becomes 0x00000801 (not 0x00000000).

http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixassem/ alangref/mtcrf.htm

This is the language reference for POWER & PowerPC.
Some forms described in this documentation are valid only for POWER
Please use PowerPC Environment Manual for PowerPC only specifications.

In fact I was referring to my old PowerPC Spec book in french from IBM (titled Architecture PowerPC), this link was the first google returned. After looking again in my book, I found what you said. I am confused, I wrote this a bit quickly. But the fact remains, would you send a correct patch for that? It'll definitely be compulsory in order to boot Mac OS X 10.4, and for darwin-user.



reply via email to

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