Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbJ7m-0000Vl-Qo for qemu-devel@nongnu.org; Thu, 04 Sep 2008 14:00:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbJ7l-0000Ur-5p for qemu-devel@nongnu.org; Thu, 04 Sep 2008 14:00:06 -0400 Received: from [199.232.76.173] (port=43613 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbJ7l-0000Um-2q for qemu-devel@nongnu.org; Thu, 04 Sep 2008 14:00:05 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:21909) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbJ7k-0002HU-CZ for qemu-devel@nongnu.org; Thu, 04 Sep 2008 14:00:04 -0400 Received: by fg-out-1718.google.com with SMTP id l26so58269fgb.8 for ; Thu, 04 Sep 2008 11:00:03 -0700 (PDT) Message-Id: <9F25F767-0618-4970-88E0-83FD155753C4@googlemail.com> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <20080904143931.GC11924@volta.aurel32.net> Content-Type: multipart/mixed; boundary=Apple-Mail-20--421674229 Mime-Version: 1.0 (Apple Message framework v926) Subject: [Qemu-devel] [PATCH 8/x] ppc: Convert op_set_FT0 to TCG Date: Thu, 4 Sep 2008 19:59:37 +0200 References: <20080903050757.GX4681@volta.aurel32.net> <20080903112840.GC17474@networkno.de> <7F235F5C-A1C9-4617-8C8D-900778862BBD@web.de> <67BC3D0E-6819-426A-BD93-ADE75621E6E4@web.de> <3D7FC18B-1027-4AB9-ACDE-E7B650F259F2@googlemail.com> <519F0BAB-FCDE-40D4-9255-48CB569909E5@googlemail.com> <20080904143931.GC11924@volta.aurel32.net> Reply-To: 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 Cc: =?ISO-8859-1?Q?Aur=E9lien_Jarno?= --Apple-Mail-20--421674229 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Replace op_set_FT0 with tcg_gen_movi_i64. Signed-off-by: Andreas Faerber --- Here's a small one since we now seem to be both working on ppc. I'm not sure if this is correct since the dyngen op set the upper half to zero. Do we need an explicit cast to 32 bits for the immediate argument to assure they will be zero? Or was that just to avoid garbage with dyngen? Andreas target-ppc/op.c | 10 ---------- target-ppc/translate.c | 2 +- 2 files changed, 1 insertions(+), 11 deletions(-) diff --git a/target-ppc/op.c b/target-ppc/op.c index a31b41f..81329e3 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -424,16 +424,6 @@ void OPPROTO op_load_fpscr_FT0 (void) RETURN(); } -void OPPROTO op_set_FT0 (void) -{ - CPU_DoubleU u; - - u.l.upper = 0; - u.l.lower = PARAM1; - FT0 = u.d; - RETURN(); -} - void OPPROTO op_load_fpscr_T0 (void) { T0 = (env->fpscr >> PARAM1) & 0xF; diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 9dd2506..5139ae6 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -2090,7 +2090,7 @@ GEN_HANDLER(mtfsfi, 0x3F, 0x06, 0x04, 0x006f0800, PPC_FLOAT) bf = crbD(ctx->opcode) >> 2; sh = 7 - bf; gen_optimize_fprf(); - gen_op_set_FT0(FPIMM(ctx->opcode) << (4 * sh)); + tcg_gen_movi_i64(cpu_FT[0], FPIMM(ctx->opcode) << (4 * sh)); gen_reset_fpstatus(); gen_op_store_fpscr(1 << sh); if (unlikely(Rc(ctx->opcode) != 0)) { -- 1.5.5.1 --Apple-Mail-20--421674229 Content-Disposition: attachment; filename=op_set_FT0.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="op_set_FT0.patch" Content-Transfer-Encoding: quoted-printable =46rom=2072b09a4fc1ae21d6de0d742e7ff8145d8e8876f2=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?utf-8?q?Andreas=3D20F=3DC3=3DA4rber?=3D=20= =0ADate:=20Thu,=204=20Sep=202008=2019:47:58=20= +0200=0ASubject:=20[PATCH]=20ppc:=20Convert=20op_set_FT0=20to=20TCG=0A=0A= ---=0A=20target-ppc/op.c=20=20=20=20=20=20=20=20|=20=20=2010=20= ----------=0A=20target-ppc/translate.c=20|=20=20=20=202=20+-=0A=202=20= files=20changed,=201=20insertions(+),=2011=20deletions(-)=0A=0Adiff=20= --git=20a/target-ppc/op.c=20b/target-ppc/op.c=0Aindex=20a31b41f..81329e3=20= 100644=0A---=20a/target-ppc/op.c=0A+++=20b/target-ppc/op.c=0A@@=20= -424,16=20+424,6=20@@=20void=20OPPROTO=20op_load_fpscr_FT0=20(void)=0A=20= =20=20=20=20RETURN();=0A=20}=0A=20=0A-void=20OPPROTO=20op_set_FT0=20= (void)=0A-{=0A-=20=20=20=20CPU_DoubleU=20u;=0A-=0A-=20=20=20=20u.l.upper=20= =3D=200;=0A-=20=20=20=20u.l.lower=20=3D=20PARAM1;=0A-=20=20=20=20FT0=20=3D= =20u.d;=0A-=20=20=20=20RETURN();=0A-}=0A-=0A=20void=20OPPROTO=20= op_load_fpscr_T0=20(void)=0A=20{=0A=20=20=20=20=20T0=20=3D=20(env->fpscr=20= >>=20PARAM1)=20&=200xF;=0Adiff=20--git=20a/target-ppc/translate.c=20= b/target-ppc/translate.c=0Aindex=209dd2506..5139ae6=20100644=0A---=20= a/target-ppc/translate.c=0A+++=20b/target-ppc/translate.c=0A@@=20-2090,7=20= +2090,7=20@@=20GEN_HANDLER(mtfsfi,=200x3F,=200x06,=200x04,=200x006f0800,=20= PPC_FLOAT)=0A=20=20=20=20=20bf=20=3D=20crbD(ctx->opcode)=20>>=202;=0A=20=20= =20=20=20sh=20=3D=207=20-=20bf;=0A=20=20=20=20=20gen_optimize_fprf();=0A= -=20=20=20=20gen_op_set_FT0(FPIMM(ctx->opcode)=20<<=20(4=20*=20sh));=0A+=20= =20=20=20tcg_gen_movi_i64(cpu_FT[0],=20FPIMM(ctx->opcode)=20<<=20(4=20*=20= sh));=0A=20=20=20=20=20gen_reset_fpstatus();=0A=20=20=20=20=20= gen_op_store_fpscr(1=20<<=20sh);=0A=20=20=20=20=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=20{=0A--=20=0A1.5.5.1=0A=0A= --Apple-Mail-20--421674229 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-20--421674229--