[Top][All Lists]

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

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

From: Pierre d'Herbemont
Subject: [Qemu-devel] [Patch] target-ppc mtcrf instruction not recognized
Date: Sat, 14 May 2005 19:20:32 +0200


I have been playing with ppc-darwin-user. And I have to say that qemu- ppc is too strict with ppc opcode validity: On Mac OS X binary release called Tiger (or 10.4), the __bzero function [1] contains a mtcrf, which has been translated to 0x7c901120, by Apple's as. Current qemu rejects it, saying it is invalid. According to the IBM Specification the mtcrf instruction [2], contains reserved flags, for which the values are unknown. qemu assumes that those are set to 1, which is obviously wrong. The attached patch provides a fix.

The mtcrf case might not be the only case in which such a situation occurs. That would need a special attention, though being strict is better than letting pass.


[1] http://fxr.watson.org/fxr/source/osfmk/ppc/commpage/bzero_32.s? v=DARWIN8#L98 [2] http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixassem/ alangref/mtcrf.htm

Attachment: qemu_mtcrf.diff.txt
Description: Text document

reply via email to

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