From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4Y95-0004lH-Tm for qemu-devel@nongnu.org; Tue, 18 Dec 2007 03:49:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4Y92-0004j7-Ix for qemu-devel@nongnu.org; Tue, 18 Dec 2007 03:49:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4Y91-0004ia-LC for qemu-devel@nongnu.org; Tue, 18 Dec 2007 03:49:43 -0500 Received: from smtp1b.orange.fr ([193.252.23.64]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4Y90-0001Qv-SS for qemu-devel@nongnu.org; Tue, 18 Dec 2007 03:49:43 -0500 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1b02.orange.fr (SMTP Server) with ESMTP id B3C1F7000093 for ; Tue, 18 Dec 2007 09:49:40 +0100 (CET) Received: from wwinf1b06 (wwinf1b06 [10.232.19.33]) by mwinf1b02.orange.fr (SMTP Server) with ESMTP id A95507000087 for ; Tue, 18 Dec 2007 09:49:40 +0100 (CET) From: claude vittoria Message-ID: <3724340.369091197967780595.JavaMail.www@wwinf1b06> Subject: Re: [Qemu-devel] [PPC] FPIMM macro and mtfsfi instruction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: Tue, 18 Dec 2007 09:49:40 +0100 (CET) Reply-To: claude vittoria , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi Jocelyn, Thanks for the quickly answer, but I got a wrong result again. The actual version of mtfsfi translate.c:l2048 does not seem update the good flag. The programmer environnement manual 32bits gives if Rc = 1 affected : copy of FX,FEX,VX,OX flags of FPSCR into CR1 of CR. Here, I only see the update of xer_so in CR. Could you confirm my opinion ? Regards, Claude /* mtfsfi */ GEN_HANDLER(mtfsfi, 0x3F, 0x06, 0x04, 0x006f0800, PPC_FLOAT) { [...] if (unlikely(Rc(ctx->opcode) != 0)) { gen_op_load_fpcc(); gen_op_set_Rc0(); } [...] } On Mon, 2007-12-17 at 15:52 +0100, claude vittoria wrote: > Hi everybody, > > I think that I get a wrong result with mtfsfi instruction. > > I think to get a solution, see below. > Could you confirm my opinion ? Seems there have been (once again) a confusion between IBM bit notation (0 is MSB...) and standard one. You're right, FPIMM should be taken using EXTRACT_HELPER(FPIMM, 12, 4); Thanks for the report. > translate.c > l344:EXTRACT_HELPER(crbD, 21, 5); > ... > l375:EXTRACT_HELPER(FPIMM, 20, 4); <======FPIMM must be (FPIMM, 12, 4) or > crbB >> 1 for mtfsfi; IMM is bits[16-19] of the instruction in PPC > programming environnement 32bit (p8-135). IMM is not one bit before crbD. > ... [...] -- Jocelyn Mayer