From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GTF0K-0000ne-9y for qemu-devel@nongnu.org; Fri, 29 Sep 2006 05:50:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GTF0I-0000ml-4d for qemu-devel@nongnu.org; Fri, 29 Sep 2006 05:49:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GTF0I-0000mg-04 for qemu-devel@nongnu.org; Fri, 29 Sep 2006 05:49:58 -0400 Received: from [129.41.63.69] (helo=out001.atlarge.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GTF5Z-0007XR-9K for qemu-devel@nongnu.org; Fri, 29 Sep 2006 05:55:25 -0400 Message-ID: <451CEC42.8000905@telargo.com> Date: Fri, 29 Sep 2006 11:49:54 +0200 From: Tom Marn MIME-Version: 1.0 Subject: Re: [Qemu-devel] ppc "stfiwx" floating point missing implementation References: <451CDCC4.4060001@telargo.com> In-Reply-To: <451CDCC4.4060001@telargo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: tom.marn@telargo.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tom.marn@telargo.com, qemu-devel@nongnu.org Tom Marn wrote: > Here is my modified translate.c (still broken code) Re-sending previous malformed patch (I hope this one will be formated ok). --- target-ppc/translate.c.orig 2006-09-29 09:29:28.000000000 +0200 +++ target-ppc/translate.c 2006-09-29 09:39:17.000000000 +0200 @@ -1715,21 +1715,30 @@ GEN_STFS(fs, 0x14); /* Optional: */ /* stfiwx */ GEN_HANDLER(stfiwx, 0x1F, 0x17, 0x1E, 0x00000001, PPC_FLOAT) { if (!ctx->fpu_enabled) { RET_EXCP(ctx, EXCP_NO_FP, 0); return; } - RET_INVAL(ctx); + + if (rA(ctx->opcode) == 0) { + gen_op_load_gpr_T0(rB(ctx->opcode)); + } else { + gen_op_load_gpr_T0(rA(ctx->opcode)); + gen_op_load_gpr_T1(rB(ctx->opcode)); + gen_op_add(); + } + gen_op_load_fpr_FT1(rS(ctx->opcode)); + op_ldst(stfs); } /*** Branch ***/ static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest) { TranslationBlock *tb; tb = ctx->tb; if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) { if (n == 0)