Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kaybb-0002bC-6i for qemu-devel@nongnu.org; Wed, 03 Sep 2008 16:05:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kayba-0002al-2W for qemu-devel@nongnu.org; Wed, 03 Sep 2008 16:05:30 -0400 Received: from [199.232.76.173] (port=60559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaybZ-0002ah-Ob for qemu-devel@nongnu.org; Wed, 03 Sep 2008 16:05:29 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:40957) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KaybT-00029Q-Qb for qemu-devel@nongnu.org; Wed, 03 Sep 2008 16:05:28 -0400 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 88130E99B241 for ; Wed, 3 Sep 2008 22:05:21 +0200 (CEST) Received: from [91.18.103.131] (helo=[10.0.1.1]) by smtp07.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.109 #226) id 1Kayb7-0003yC-00 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 22:05:02 +0200 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: Content-Type: multipart/mixed; boundary=Apple-Mail-10--500572155 Mime-Version: 1.0 (Apple Message framework v926) Subject: [Qemu-devel] [PATCH 5/x v2] ppc: Convert GPR moves to TCG Date: Wed, 3 Sep 2008 22:04:39 +0200 References: <1F0A98C0-A1DE-4548-8A4D-9E15EDC72686@web.de> <8E69B597-ADAC-4E4B-A675-45FEDDAF65BF@web.de> <20080902232051.GS4681@volta.aurel32.net> <20080903050757.GX4681@volta.aurel32.net> <20080903112840.GC17474@networkno.de> <7F235F5C-A1C9-4617-8C8D-900778862BBD@web.de> <67BC3D0E-6819-426A-BD93-ADE75621E6E4@web.de> Sender: andreas.faerber@web.de 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 --Apple-Mail-10--500572155 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Replace op_load_gpr_{T0,T1,T2} and op_store_{T0,T1,T2} with tcg_gen_mov_tl. Introduce TCG variables cpu_gpr[0..31]. For the SPE extension, assure that ppc_gpr_t is only uint64_t for ppc64. Introduce TCG variables cpu_gprh[0..31] for upper 32 bits on ppc and helpers gen_{load,store}_gpr64. Based on suggestions by Aurelien, Thiemo and Blue. Signed-off-by: Andreas Faerber --- target-ppc/cpu.h | 12 +- target-ppc/op_template.h | 85 ------ target-ppc/translate.c | 747 +++++++++++++++++++++++ +---------------------- 3 files changed, 390 insertions(+), 454 deletions(-) --Apple-Mail-10--500572155 Content-Disposition: attachment; filename=0001-ppc-Convert-GPR-moves-to-TCG.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-ppc-Convert-GPR-moves-to-TCG.patch" Content-Transfer-Encoding: quoted-printable =46rom=2032df42f476e7656621c0da3a55c9f54612ab5258=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?utf-8?q?Andreas=3D20F=3DC3=3DA4rber?=3D=20= =0ADate:=20Wed,=203=20Sep=202008=2021:52:00=20= +0200=0ASubject:=20[PATCH]=20ppc:=20Convert=20GPR=20moves=20to=20TCG=0A=0A= ---=0A=20target-ppc/cpu.h=20=20=20=20=20=20=20=20=20|=20=20=2012=20+-=0A=20= target-ppc/op_template.h=20|=20=20=2085=20------=0A=20= target-ppc/translate.c=20=20=20|=20=20747=20= ++++++++++++++++++++++++----------------------=0A=203=20files=20changed,=20= 390=20insertions(+),=20454=20deletions(-)=0A=0Adiff=20--git=20= a/target-ppc/cpu.h=20b/target-ppc/cpu.h=0Aindex=20834c08d..c7291ed=20= 100644=0A---=20a/target-ppc/cpu.h=0A+++=20b/target-ppc/cpu.h=0A@@=20= -33,17=20+33,7=20@@=20typedef=20uint64_t=20ppc_gpr_t;=0A=20=0A=20#else=20= /*=20defined=20(TARGET_PPC64)=20*/=0A=20/*=20PowerPC=2032=20definitions=20= */=0A-#if=20(HOST_LONG_BITS=20>=3D=2064)=0A-/*=20When=20using=2064=20= bits=20temporary=20registers,=0A-=20*=20we=20can=20use=2064=20bits=20GPR=20= with=20no=20extra=20cost=0A-=20*=20It's=20even=20an=20optimization=20as=20= this=20will=20prevent=0A-=20*=20the=20compiler=20to=20do=20unuseful=20= masking=20in=20the=20micro-ops.=0A-=20*/=0A-typedef=20uint64_t=20= ppc_gpr_t;=0A-#else=20/*=20(HOST_LONG_BITS=20>=3D=2064)=20*/=0A=20= typedef=20uint32_t=20ppc_gpr_t;=0A-#endif=20/*=20(HOST_LONG_BITS=20>=3D=20= 64)=20*/=0A-=0A=20#define=20TARGET_LONG_BITS=2032=0A=20=0A=20#if=20= defined(TARGET_PPCEMB)=0A@@=20-541,7=20+531,7=20@@=20struct=20= CPUPPCState=20{=0A=20=20=20=20=20/*=20First=20are=20the=20most=20= commonly=20used=20resources=0A=20=20=20=20=20=20*=20during=20translated=20= code=20execution=0A=20=20=20=20=20=20*/=0A-#if=20(HOST_LONG_BITS=20=3D=3D=20= 32)=0A+#if=20(TARGET_LONG_BITS=20>=20HOST_LONG_BITS)=20||=20= !defined(TARGET_PPC64)=0A=20=20=20=20=20/*=20temporary=20fixed-point=20= registers=0A=20=20=20=20=20=20*=20used=20to=20emulate=2064=20bits=20= registers=20on=2032=20bits=20hosts=0A=20=20=20=20=20=20*/=0Adiff=20--git=20= a/target-ppc/op_template.h=20b/target-ppc/op_template.h=0Aindex=20= e6d6afa..8c65e49=20100644=0A---=20a/target-ppc/op_template.h=0A+++=20= b/target-ppc/op_template.h=0A@@=20-18,91=20+18,6=20@@=0A=20=20*=20= Foundation,=20Inc.,=2059=20Temple=20Place,=20Suite=20330,=20Boston,=20MA=20= =2002111-1307=20=20USA=0A=20=20*/=0A=20=0A-/*=20General=20purpose=20= registers=20moves=20*/=0A-void=20OPPROTO=20glue(op_load_gpr_T0_gpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20T0=20=3D=20env->gpr[REG];=0A-=20=20=20=20= RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_load_gpr_T1_gpr,=20REG)=20= (void)=0A-{=0A-=20=20=20=20T1=20=3D=20env->gpr[REG];=0A-=20=20=20=20= RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_load_gpr_T2_gpr,=20REG)=20= (void)=0A-{=0A-=20=20=20=20T2=20=3D=20env->gpr[REG];=0A-=20=20=20=20= RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_store_T0_gpr_gpr,=20REG)=20= (void)=0A-{=0A-=20=20=20=20env->gpr[REG]=20=3D=20T0;=0A-=20=20=20=20= RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_store_T1_gpr_gpr,=20REG)=20= (void)=0A-{=0A-=20=20=20=20env->gpr[REG]=20=3D=20T1;=0A-=20=20=20=20= RETURN();=0A-}=0A-=0A-#if=200=20//=20unused=0A-void=20OPPROTO=20= glue(op_store_T2_gpr_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20= env->gpr[REG]=20=3D=20T2;=0A-=20=20=20=20RETURN();=0A-}=0A-#endif=0A-=0A= -/*=20General=20purpose=20registers=20containing=20vector=20operands=20= moves=20*/=0A-#if=20!defined(TARGET_PPC64)=0A-void=20OPPROTO=20= glue(op_load_gpr64_T0_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20T0_64=20=3D= =20(uint64_t)env->gpr[REG]=20|=20((uint64_t)env->gprh[REG]=20<<=2032);=0A= -=20=20=20=20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20= glue(op_load_gpr64_T1_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20T1_64=20=3D= =20(uint64_t)env->gpr[REG]=20|=20((uint64_t)env->gprh[REG]=20<<=2032);=0A= -=20=20=20=20RETURN();=0A-}=0A-=0A-#if=200=20//=20unused=0A-void=20= OPPROTO=20glue(op_load_gpr64_T2_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20= T2_64=20=3D=20(uint64_t)env->gpr[REG]=20|=20((uint64_t)env->gprh[REG]=20= <<=2032);=0A-=20=20=20=20RETURN();=0A-}=0A-#endif=0A-=0A-void=20OPPROTO=20= glue(op_store_T0_gpr64_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20= env->gpr[REG]=20=3D=20T0_64;=0A-=20=20=20=20env->gprh[REG]=20=3D=20T0_64=20= >>=2032;=0A-=20=20=20=20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20= glue(op_store_T1_gpr64_gpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20= env->gpr[REG]=20=3D=20T1_64;=0A-=20=20=20=20env->gprh[REG]=20=3D=20T1_64=20= >>=2032;=0A-=20=20=20=20RETURN();=0A-}=0A-=0A-#if=200=20//=20unused=0A= -void=20OPPROTO=20glue(op_store_T2_gpr64_gpr,=20REG)=20(void)=0A-{=0A-=20= =20=20=20env->gpr[REG]=20=3D=20T2_64;=0A-=20=20=20=20env->gprh[REG]=20=3D=20= T2_64=20>>=2032;=0A-=20=20=20=20RETURN();=0A-}=0A-#endif=0A-#endif=20/*=20= !defined(TARGET_PPC64)=20*/=0A-=0A=20/*=20Altivec=20registers=20moves=20= */=0A=20void=20OPPROTO=20glue(op_load_avr_A0_avr,=20REG)=20(void)=0A=20{=0A= diff=20--git=20a/target-ppc/translate.c=20b/target-ppc/translate.c=0A= index=209068936..8fa6056=20100644=0A---=20a/target-ppc/translate.c=0A+++=20= b/target-ppc/translate.c=0A@@=20-44,15=20+44,37=20@@=0A=20= /*************************************************************************= ****/=0A=20/*=20Code=20translation=20helpers=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*/=0A=20=0A-static=20TCGv=20= cpu_env,=20cpu_T[3];=0A+/*=20global=20register=20indexes=20*/=0A+static=20= TCGv=20cpu_env;=0A+static=20char=20cpu_reg_names[10*3=20+=2022*4=0A+#if=20= !defined(TARGET_PPC64)=0A+=20=20=20=20+=2010*4=20+=2022*5=0A+#endif=0A= +];=0A+static=20TCGv=20cpu_gpr[32];=0A+#if=20!defined(TARGET_PPC64)=0A= +static=20TCGv=20cpu_gprh[32];=0A+#endif=0A+=0A+/*=20dyngen=20register=20= indexes=20*/=0A+static=20TCGv=20cpu_T[3];=0A+#if=20defined(TARGET_PPC64)=0A= +#define=20cpu_T64=20cpu_T=0A+#else=0A+static=20TCGv=20cpu_T64[3];=0A= +#endif=0A=20=0A=20#include=20"gen-icount.h"=0A=20=0A=20void=20= ppc_translate_init(void)=0A=20{=0A+=20=20=20=20int=20i;=0A+=20=20=20=20= char*=20p;=0A=20=20=20=20=20static=20int=20done_init=20=3D=200;=0A+=20=20= =20=20=0A=20=20=20=20=20if=20(done_init)=0A=20=20=20=20=20=20=20=20=20= return;=0A+=20=20=20=20=0A=20=20=20=20=20cpu_env=20=3D=20= tcg_global_reg_new(TCG_TYPE_PTR,=20TCG_AREG0,=20"env");=0A=20#if=20= TARGET_LONG_BITS=20>=20HOST_LONG_BITS=0A=20=20=20=20=20cpu_T[0]=20=3D=20= tcg_global_mem_new(TCG_TYPE_TL,=0A@@=20-66,6=20+88,31=20@@=20void=20= ppc_translate_init(void)=0A=20=20=20=20=20cpu_T[1]=20=3D=20= tcg_global_reg_new(TCG_TYPE_TL,=20TCG_AREG2,=20"T1");=0A=20=20=20=20=20= cpu_T[2]=20=3D=20tcg_global_reg_new(TCG_TYPE_TL,=20TCG_AREG3,=20"T2");=0A= =20#endif=0A+#if=20!defined(TARGET_PPC64)=0A+=20=20=20=20cpu_T64[0]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I64,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= TCG_AREG0,=20offsetof(CPUState,=20t0),=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "T0_64");=0A+=20=20=20=20cpu_T64[1]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I64,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= TCG_AREG0,=20offsetof(CPUState,=20t1),=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "T1_64");=0A+=20=20=20=20cpu_T64[2]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I64,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= TCG_AREG0,=20offsetof(CPUState,=20t2),=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "T2_64");=0A+#endif=0A+=20=20=20=20=0A+=20=20=20=20p=20=3D=20= cpu_reg_names;=0A+=20=20=20=20for=20(i=20=3D=200;=20i=20<=2032;=20i++)=20= {=0A+=20=20=20=20=20=20=20=20sprintf(p,=20"r%d",=20i);=0A+=20=20=20=20=20= =20=20=20cpu_gpr[i]=20=3D=20tcg_global_mem_new(TCG_TYPE_TL,=0A+=20=20=20=20= =20=20=20=20=20=20=20=20TCG_AREG0,=20offsetof(CPUState,=20gpr[i]),=20p);=0A= +=20=20=20=20=20=20=20=20p=20+=3D=20(i=20<=2010)=20?=203=20:=204;=0A+#if=20= !defined(TARGET_PPC64)=0A+=20=20=20=20=20=20=20=20sprintf(p,=20"r%dH",=20= i);=0A+=20=20=20=20=20=20=20=20cpu_gprh[i]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I32,=0A+=20=20=20=20=20=20=20=20=20=20=20=20= TCG_AREG0,=20offsetof(CPUState,=20gprh[i]),=20p);=0A+=20=20=20=20=20=20=20= =20p=20+=3D=20(i=20<=2010)=20?=204=20:=205;=0A+#endif=0A+=20=20=20=20}=0A= =20=0A=20=20=20=20=20/*=20register=20helpers=20*/=0A=20#undef=20= DEF_HELPER=0A@@=20-126,17=20+173,6=20@@=20GEN8(gen_op_store_T0_crf,=20= gen_op_store_T0_crf_crf);=0A=20GEN8(gen_op_store_T1_crf,=20= gen_op_store_T1_crf_crf);=0A=20#endif=0A=20=0A-/*=20General=20purpose=20= registers=20moves=20*/=0A-GEN32(gen_op_load_gpr_T0,=20= gen_op_load_gpr_T0_gpr);=0A-GEN32(gen_op_load_gpr_T1,=20= gen_op_load_gpr_T1_gpr);=0A-GEN32(gen_op_load_gpr_T2,=20= gen_op_load_gpr_T2_gpr);=0A-=0A-GEN32(gen_op_store_T0_gpr,=20= gen_op_store_T0_gpr_gpr);=0A-GEN32(gen_op_store_T1_gpr,=20= gen_op_store_T1_gpr_gpr);=0A-#if=200=20//=20unused=0A= -GEN32(gen_op_store_T2_gpr,=20gen_op_store_T2_gpr_gpr);=0A-#endif=0A-=0A=20= /*=20floating=20point=20registers=20moves=20*/=0A=20= GEN32(gen_op_load_fpr_FT0,=20gen_op_load_fpr_FT0_fpr);=0A=20= GEN32(gen_op_load_fpr_FT1,=20gen_op_load_fpr_FT1_fpr);=0A@@=20-667,10=20= +703,10=20@@=20static=20opc_handler_t=20invalid_handler=20=3D=20{=0A=20= #define=20__GEN_INT_ARITH2(name,=20opc1,=20opc2,=20opc3,=20inval,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= GEN_HANDLER(name,=20opc1,=20opc2,=20opc3,=20inval,=20type)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-678,10=20+714,10=20@@=20GEN_HANDLER(name,=20opc1,=20= opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20#define=20= __GEN_INT_ARITH2_O(name,=20opc1,=20opc2,=20opc3,=20inval,=20type)=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20opc1,=20= opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20= =20gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rB(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A= @@=20-689,18=20+725,18=20@@=20GEN_HANDLER(name,=20opc1,=20opc2,=20opc3,=20= inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20#define=20__GEN_INT_ARITH1(name,=20= opc1,=20opc2,=20opc3,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20opc1,=20opc2,=20= opc3,=200x0000F800,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20#define=20__GEN_INT_ARITH1_O(name,=20opc1,=20opc2,=20= opc3,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20GEN_HANDLER(name,=20opc1,=20opc2,=20opc3,=200x0000F800,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-723,13=20+759,13=20@@=20= __GEN_INT_ARITH1_O(name##o,=20opc1,=20opc2,=20opc3=20|=200x10,=20type)=0A= =20#define=20__GEN_INT_ARITH2_64(name,=20opc1,=20opc2,=20opc3,=20inval,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20= opc1,=20opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= -=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20= (ctx->sf_mode)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= gen_op_##name##_64();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20else=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-737,13=20+773,13=20@@=20GEN_HANDLER(name,=20opc1,=20= opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20#define=20= __GEN_INT_ARITH2_O_64(name,=20opc1,=20opc2,=20opc3,=20inval,=20type)=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20opc1,=20opc2,=20= opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rB(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20(ctx->sf_mode)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20gen_op_##name##_64();=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20else=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= =20=20=20=20=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-751,24=20+787,24=20@@=20GEN_HANDLER(name,=20opc1,=20= opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20#define=20= __GEN_INT_ARITH1_64(name,=20opc1,=20opc2,=20opc3,=20type)=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20= opc1,=20opc2,=20opc3,=200x0000F800,=20type)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20= =20gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20(ctx->sf_mode)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20gen_op_##name##_64();=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20else=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= =20=20=20=20=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20#define=20__GEN_INT_ARITH1_O_64(name,=20opc1,=20= opc2,=20opc3,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20GEN_HANDLER(name,=20opc1,=20opc2,=20opc3,=200x0000F800,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(ctx->sf_mode)=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= =20=20=20=20gen_op_##name##_64();=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20else=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-986,18=20+1022,18=20@@=20GEN_HANDLER(addi,=20= 0x0E,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20=20=20=20=20=20=20= =20=20/*=20li=20case=20*/=0A=20=20=20=20=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[0],=20simm);=0A=20=20=20=20=20}=20else=20{=0A-=20=20= =20=20=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20= =20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20= =20=20=20=20=20=20if=20(likely(simm=20!=3D=200))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20gen_op_addi(simm);=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= addic=20*/=0A=20GEN_HANDLER(addic,=200x0C,=200xFF,=200xFF,=200x00000000,=20= PPC_INTEGER)=0A=20{=0A=20=20=20=20=20target_long=20simm=20=3D=20= SIMM(ctx->opcode);=0A=20=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(simm=20!=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_T[0]);=0A=20=20=20=20=20=20=20=20=20= gen_op_addi(simm);=0A@@=20-1010,14=20+1046,14=20@@=20GEN_HANDLER(addic,=20= 0x0C,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20=20=20=20=20}=20= else=20{=0A=20=20=20=20=20=20=20=20=20gen_op_clear_xer_ca();=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= addic.=20*/=0A=20GEN_HANDLER2(addic_,=20"addic.",=200x0D,=200xFF,=20= 0xFF,=200x00000000,=20PPC_INTEGER)=0A=20{=0A=20=20=20=20=20target_long=20= simm=20=3D=20SIMM(ctx->opcode);=0A=20=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(simm=20!=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_T[0]);=0A=20=20=20=20=20=20=20=20=20= gen_op_addi(simm);=0A@@=20-1030,7=20+1066,7=20@@=20GEN_HANDLER2(addic_,=20= "addic.",=200x0D,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20=20=20= =20=20}=20else=20{=0A=20=20=20=20=20=20=20=20=20gen_op_clear_xer_ca();=0A= =20=20=20=20=20}=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A=20/*=20addis=20*/=0A@@=20-1042,30=20= +1078,30=20@@=20GEN_HANDLER(addis,=200x0F,=200xFF,=200xFF,=200x00000000,=20= PPC_INTEGER)=0A=20=20=20=20=20=20=20=20=20/*=20lis=20case=20*/=0A=20=20=20= =20=20=20=20=20=20tcg_gen_movi_tl(cpu_T[0],=20simm=20<<=2016);=0A=20=20=20= =20=20}=20else=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20=20= =20=20=20if=20(likely(simm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20gen_op_addi(simm=20<<=2016);=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= mulli=20*/=0A=20GEN_HANDLER(mulli,=200x07,=200xFF,=200xFF,=200x00000000,=20= PPC_INTEGER)=0A=20{=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20= =20=20=20gen_op_mulli(SIMM(ctx->opcode));=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= subfic=20*/=0A=20GEN_HANDLER(subfic,=200x08,=200xFF,=200xFF,=20= 0x00000000,=20PPC_INTEGER)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20#if=20= defined(TARGET_PPC64)=0A=20=20=20=20=20if=20(ctx->sf_mode)=0A=20=20=20=20= =20=20=20=20=20gen_op_subfic_64(SIMM(ctx->opcode));=0A=20=20=20=20=20= else=0A=20#endif=0A=20=20=20=20=20=20=20=20=20= gen_op_subfic(SIMM(ctx->opcode));=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= #if=20defined(TARGET_PPC64)=0A@@=20-1086,8=20+1122,8=20@@=20= GEN_INT_ARITH2=20(divdu,=20=200x1F,=200x09,=200x0E,=20PPC_64B);=0A=20= #define=20GEN_CMP(name,=20opc,=20type)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=200x1F,=200x00,=20= opc,=200x00400000,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rB(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20(ctx->sf_mode=20&&=20= (ctx->opcode=20&=200x00200000))=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= gen_op_##name##_64();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20else=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A@@=20-1098,8=20+1134,8=20@@=20= GEN_HANDLER(name,=200x1F,=200x00,=20opc,=200x00400000,=20type)=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= #define=20GEN_CMP(name,=20opc,=20type)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=200x1F,=200x00,=20= opc,=200x00400000,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rA(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rB(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20gen_op_store_T0_crf(crfD(ctx->opcode));=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20}=0A@@=20-1110,7=20+1146,7=20@@=20= GEN_CMP(cmp,=200x00,=20PPC_INTEGER);=0A=20/*=20cmpi=20*/=0A=20= GEN_HANDLER(cmpi,=200x0B,=200xFF,=200xFF,=200x00400000,=20PPC_INTEGER)=0A= =20{=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20#if=20= defined(TARGET_PPC64)=0A=20=20=20=20=20if=20(ctx->sf_mode=20&&=20= (ctx->opcode=20&=200x00200000))=0A=20=20=20=20=20=20=20=20=20= gen_op_cmpi_64(SIMM(ctx->opcode));=0A@@=20-1124,7=20+1160,7=20@@=20= GEN_CMP(cmpl,=200x01,=20PPC_INTEGER);=0A=20/*=20cmpli=20*/=0A=20= GEN_HANDLER(cmpli,=200x0A,=200xFF,=200xFF,=200x00400000,=20PPC_INTEGER)=0A= =20{=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20#if=20= defined(TARGET_PPC64)=0A=20=20=20=20=20if=20(ctx->sf_mode=20&&=20= (ctx->opcode=20&=200x00200000))=0A=20=20=20=20=20=20=20=20=20= gen_op_cmpli_64(UIMM(ctx->opcode));=0A@@=20-1143,24=20+1179,24=20@@=20= GEN_HANDLER(isel,=200x1F,=200x0F,=200xFF,=200x00000001,=20PPC_ISEL)=0A=20= =20=20=20=20if=20(rA(ctx->opcode)=20=3D=3D=200)=20{=0A=20=20=20=20=20=20=20= =20=20tcg_gen_movi_tl(cpu_T[0],=200);=0A=20=20=20=20=20}=20else=20{=0A-=20= =20=20=20=20=20=20=20gen_op_load_gpr_T1(rA(ctx->opcode));=0A+=20=20=20=20= =20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20= =20=20=20}=0A-=20=20=20=20gen_op_load_gpr_T2(rB(ctx->opcode));=0A+=20=20=20= =20tcg_gen_mov_tl(cpu_T[2],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= mask=20=3D=201=20<<=20(3=20-=20(bi=20&=200x03));=0A=20=20=20=20=20= gen_op_load_crf_T0(bi=20>>=202);=0A=20=20=20=20=20= gen_op_test_true(mask);=0A=20=20=20=20=20gen_op_isel();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /***=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20Integer=20logical=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20***/=0A=20#define=20= __GEN_LOGICAL2(name,=20opc2,=20opc3,=20type)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= GEN_HANDLER(name,=200x1F,=20opc2,=20opc3,=200x00000000,=20type)=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-1170,9=20+1206,9=20@@=20__GEN_LOGICAL2(name,=20= 0x1C,=20opc,=20type)=0A=20#define=20GEN_LOGICAL1(name,=20opc,=20type)=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name,=20= 0x1F,=200x1A,=20opc,=200x00000000,=20type)=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20= =20gen_op_load_gpr_T0(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rS(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20gen_set_Rc0(ctx);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A= @@=20-1184,17=20+1220,17=20@@=20GEN_LOGICAL2(andc,=200x01,=20= PPC_INTEGER);=0A=20/*=20andi.=20*/=0A=20GEN_HANDLER2(andi_,=20"andi.",=20= 0x1C,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_andi_T0(UIMM(ctx->opcode));=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A=20/*=20andis.=20*/=0A=20GEN_HANDLER2(andis_,=20= "andis.",=200x1D,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20{=0A= -=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_andi_T0(UIMM(ctx->opcode)=20<<=2016);=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A=20=0A@@=20-1221,16=20+1257,16=20@@=20= GEN_HANDLER(or,=200x1F,=200x1C,=200x0D,=200x00000000,=20PPC_INTEGER)=0A=20= =20=20=20=20rb=20=3D=20rB(ctx->opcode);=0A=20=20=20=20=20/*=20= Optimisation=20for=20mr.=20ri=20case=20*/=0A=20=20=20=20=20if=20(rs=20!=3D= =20ra=20||=20rs=20!=3D=20rb)=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rs);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rs]);=0A=20=20=20=20=20=20=20=20=20if=20= (rs=20!=3D=20rb)=20{=0A-=20=20=20=20=20=20=20=20=20=20=20=20= gen_op_load_gpr_T1(rb);=0A+=20=20=20=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rb]);=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20gen_op_or();=0A=20=20=20=20=20=20=20=20=20}=0A-=20=20=20=20=20=20= =20=20gen_op_store_T0_gpr(ra);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20=20=20=20=20=20=20=20=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20gen_set_Rc0(ctx);=0A=20=20=20=20=20}=20else=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rs);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rs]);=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20#if=20defined(TARGET_PPC64)=0A=20=20=20=20=20}=20= else=20{=0A@@=20-1286,15=20+1322,15=20@@=20GEN_LOGICAL2(orc,=200x0C,=20= PPC_INTEGER);=0A=20/*=20xor=20&=20xor.=20*/=0A=20GEN_HANDLER(xor,=20= 0x1F,=200x1C,=200x09,=200x00000000,=20PPC_INTEGER)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= /*=20Optimisation=20for=20"set=20to=20zero"=20case=20*/=0A=20=20=20=20=20= if=20(rS(ctx->opcode)=20!=3D=20rB(ctx->opcode))=20{=0A-=20=20=20=20=20=20= =20=20gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20=20= =20=20=20gen_op_xor();=0A=20=20=20=20=20}=20else=20{=0A=20=20=20=20=20=20= =20=20=20tcg_gen_movi_tl(cpu_T[0],=200);=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1308,10=20+1344,10=20@@=20= GEN_HANDLER(ori,=200x18,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20= =20=20=20=20=20=20=20=20/*=20XXX:=20should=20handle=20special=20NOPs=20= for=20POWER=20series=20*/=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20= =20=20}=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(uimm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_op_ori(uimm);=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20= }=0A=20/*=20oris=20*/=0A=20GEN_HANDLER(oris,=200x19,=200xFF,=200xFF,=20= 0x00000000,=20PPC_INTEGER)=0A@@=20-1322,10=20+1358,10=20@@=20= GEN_HANDLER(oris,=200x19,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=20=20=20=20=20=20=20=20/*=20NOP=20*/=0A=20=20=20=20=20=20=20=20=20= return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(uimm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_op_ori(uimm=20<<=2016);=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= xori=20*/=0A=20GEN_HANDLER(xori,=200x1A,=200xFF,=200xFF,=200x00000000,=20= PPC_INTEGER)=0A@@=20-1336,10=20+1372,10=20@@=20GEN_HANDLER(xori,=200x1A,=20= 0xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A=20=20=20=20=20=20=20=20=20= /*=20NOP=20*/=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A= -=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(uimm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_op_xori(uimm);=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20= }=0A=20=0A=20/*=20xoris=20*/=0A@@=20-1351,23=20+1387,23=20@@=20= GEN_HANDLER(xoris,=200x1B,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=20=20=20=20=20=20=20=20/*=20NOP=20*/=0A=20=20=20=20=20=20=20=20=20= return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(uimm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_op_xori(uimm=20<<=2016);=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20popcntb=20:=20PowerPC=202.03=20specification=20*/=0A=20= GEN_HANDLER(popcntb,=200x1F,=200x03,=200x03,=200x0000F801,=20= PPC_POPCNTB)=0A=20{=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20= #if=20defined(TARGET_PPC64)=0A=20=20=20=20=20if=20(ctx->sf_mode)=0A=20=20= =20=20=20=20=20=20=20gen_op_popcntb_64();=0A=20=20=20=20=20else=0A=20= #endif=0A=20=20=20=20=20=20=20=20=20gen_op_popcntb();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= #if=20defined(TARGET_PPC64)=0A@@=20-1389,18=20+1425,18=20@@=20= GEN_HANDLER(rlwimi,=200x14,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=20=20=20=20sh=20=3D=20SH(ctx->opcode);=0A=20=20=20=20=20if=20= (likely(sh=20=3D=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20if=20= (likely(mb=20=3D=3D=200=20&&=20me=20=3D=3D=2031))=20{=0A-=20=20=20=20=20=20= =20=20=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20=20= =20=20=20=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20= cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20=20=20=20=20=20=20=20=20goto=20= do_store;=0A=20=20=20=20=20=20=20=20=20}=20else=20if=20(likely(mb=20=3D=3D= =2031=20&&=20me=20=3D=3D=200))=20{=0A-=20=20=20=20=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20=20=20=20= =20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20goto=20do_store;=0A=20=20=20=20=20=20=20=20=20}=0A= -=20=20=20=20=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20= =20=20=20=20=20gen_op_load_gpr_T1(rA(ctx->opcode));=0A+=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= =20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20= =20=20=20=20=20=20=20goto=20do_mask;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_rotli32_T0(SH(ctx->opcode));=0A=20=20do_mask:=0A=20#if=20= defined(TARGET_PPC64)=0A@@=20-1412,7=20+1448,7=20@@=20= GEN_HANDLER(rlwimi,=200x14,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=20=20=20=20gen_op_andi_T1(~mask);=0A=20=20=20=20=20gen_op_or();=0A=20= =20do_store:=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20= =20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20= =20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20= =20gen_set_Rc0(ctx);=0A=20}=0A@@=20-1424,7=20+1460,7=20@@=20= GEN_HANDLER(rlwinm,=200x15,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=20=20=20=20sh=20=3D=20SH(ctx->opcode);=0A=20=20=20=20=20mb=20=3D=20= MB(ctx->opcode);=0A=20=20=20=20=20me=20=3D=20ME(ctx->opcode);=0A-=20=20=20= =20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(sh=20=3D=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20goto=20= do_mask;=0A=20=20=20=20=20}=0A@@=20-1450,7=20+1486,7=20@@=20= GEN_HANDLER(rlwinm,=200x15,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20#endif=0A=20=20=20=20=20gen_op_andi_T0(MASK(mb,=20me));=0A=20=20= do_store:=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20= =20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1461,8=20+1497,8=20@@=20= GEN_HANDLER(rlwnm,=200x17,=200xFF,=200xFF,=200x00000000,=20PPC_INTEGER)=0A= =20=0A=20=20=20=20=20mb=20=3D=20MB(ctx->opcode);=0A=20=20=20=20=20me=20=3D= =20ME(ctx->opcode);=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A= -=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_rotl32_T0_T1();=0A=20=20=20=20=20if=20(unlikely(mb=20!=3D=200=20= ||=20me=20!=3D=2031))=20{=0A=20#if=20defined(TARGET_PPC64)=0A@@=20= -1471,7=20+1507,7=20@@=20GEN_HANDLER(rlwnm,=200x17,=200xFF,=200xFF,=20= 0x00000000,=20PPC_INTEGER)=0A=20#endif=0A=20=20=20=20=20=20=20=20=20= gen_op_andi_T0(MASK(mb,=20me));=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1527,7=20+1563,7=20@@=20static=20= always_inline=20void=20gen_andi_T1_64=20(DisasContext=20*ctx,=20uint64_t=20= mask)=0A=20static=20always_inline=20void=20gen_rldinm=20(DisasContext=20= *ctx,=20uint32_t=20mb,=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= uint32_t=20me,=20uint32_t=20sh)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(likely(sh=20=3D=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20goto=20= do_mask;=0A=20=20=20=20=20}=0A@@=20-1549,7=20+1585,7=20@@=20static=20= always_inline=20void=20gen_rldinm=20(DisasContext=20*ctx,=20uint32_t=20= mb,=0A=20=20do_mask:=0A=20=20=20=20=20gen_andi_T0_64(ctx,=20MASK(mb,=20= me));=0A=20=20do_store:=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1587,13=20+1623,13=20@@=20= GEN_PPC64_R4(rldic,=200x1E,=200x04);=0A=20static=20always_inline=20void=20= gen_rldnm=20(DisasContext=20*ctx,=20uint32_t=20mb,=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20uint32_t=20me)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_rotl64_T0_T1();=0A=20=20=20=20=20if=20(unlikely(mb=20!=3D=200=20= ||=20me=20!=3D=2063))=20{=0A=20=20=20=20=20=20=20=20=20= gen_andi_T0_64(ctx,=20MASK(mb,=20me));=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1627,15=20+1663,15=20@@=20static=20= always_inline=20void=20gen_rldimi=20(DisasContext=20*ctx,=20int=20mbn,=20= int=20shn)=0A=20=20=20=20=20me=20=3D=2063=20-=20sh;=0A=20=20=20=20=20if=20= (likely(sh=20=3D=3D=200))=20{=0A=20=20=20=20=20=20=20=20=20if=20= (likely(mb=20=3D=3D=200))=20{=0A-=20=20=20=20=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20=20=20=20=20=20=20=20= =20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20goto=20do_store;=0A=20=20=20=20=20=20=20=20=20}=0A= -=20=20=20=20=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20= =20=20=20=20=20gen_op_load_gpr_T1(rA(ctx->opcode));=0A+=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= =20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20= =20=20=20=20=20=20=20goto=20do_mask;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_rotli64_T0(sh);=0A=20=20do_mask:=0A=20=20=20=20=20mask=20=3D=20= MASK(mb,=20me);=0A@@=20-1643,7=20+1679,7=20@@=20static=20always_inline=20= void=20gen_rldimi=20(DisasContext=20*ctx,=20int=20mbn,=20int=20shn)=0A=20= =20=20=20=20gen_andi_T1_64(ctx,=20~mask);=0A=20=20=20=20=20gen_op_or();=0A= =20=20do_store:=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20= =20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20= =20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-1659,7=20+1695,7=20@@=20= __GEN_LOGICAL2(sraw,=200x18,=200x18,=20PPC_INTEGER);=0A=20= GEN_HANDLER(srawi,=200x1F,=200x18,=200x19,=200x00000000,=20PPC_INTEGER)=0A= =20{=0A=20=20=20=20=20int=20mb,=20me;=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(SH(ctx->opcode)=20!=3D=200)=20{=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_T[0]);=0A=20=20=20=20=20=20=20=20=20mb=20= =3D=2032=20-=20SH(ctx->opcode);=0A@@=20-1670,7=20+1706,7=20@@=20= GEN_HANDLER(srawi,=200x1F,=200x18,=200x19,=200x00000000,=20PPC_INTEGER)=0A= =20#endif=0A=20=20=20=20=20=20=20=20=20gen_op_srawi(SH(ctx->opcode),=20= MASK(mb,=20me));=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-1688,7=20+1724,7=20@@=20static=20= always_inline=20void=20gen_sradi=20(DisasContext=20*ctx,=20int=20n)=0A=20= =20=20=20=20uint64_t=20mask;=0A=20=20=20=20=20int=20sh,=20mb,=20me;=0A=20= =0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= sh=20=3D=20SH(ctx->opcode)=20+=20(n=20<<=205);=0A=20=20=20=20=20if=20(sh=20= !=3D=200)=20{=0A=20=20=20=20=20=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_T[0]);=0A@@=20-1697,7=20+1733,7=20@@=20static=20always_inline=20void=20= gen_sradi=20(DisasContext=20*ctx,=20int=20n)=0A=20=20=20=20=20=20=20=20=20= mask=20=3D=20MASK(mb,=20me);=0A=20=20=20=20=20=20=20=20=20= gen_op_sradi(sh,=20mask=20>>=2032,=20mask);=0A=20=20=20=20=20}=0A-=20=20=20= =20gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-2082,7=20+2118,7=20@@=20static=20= always_inline=20void=20gen_addr_imm_index=20(DisasContext=20*ctx,=0A=20=20= =20=20=20if=20(rA(ctx->opcode)=20=3D=3D=200)=20{=0A=20=20=20=20=20=20=20=20= =20tcg_gen_movi_tl(cpu_T[0],=20simm);=0A=20=20=20=20=20}=20else=20{=0A-=20= =20=20=20=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= =20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20= =20=20=20=20=20=20=20if=20(likely(simm=20!=3D=200))=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20gen_op_addi(simm);=0A=20=20=20=20=20}=0A@@=20-2094,10=20= +2130,10=20@@=20static=20always_inline=20void=20gen_addr_imm_index=20= (DisasContext=20*ctx,=0A=20static=20always_inline=20void=20= gen_addr_reg_index=20(DisasContext=20*ctx)=0A=20{=0A=20=20=20=20=20if=20= (rA(ctx->opcode)=20=3D=3D=200)=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20}=20= else=20{=0A-=20=20=20=20=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A= -=20=20=20=20=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20= =20=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20= =20=20=20=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20=20=20=20=20gen_op_add();=0A=20= =20=20=20=20}=0A=20#ifdef=20DEBUG_MEMORY_ACCESSES=0A@@=20-2110,7=20= +2146,7=20@@=20static=20always_inline=20void=20gen_addr_register=20= (DisasContext=20*ctx)=0A=20=20=20=20=20if=20(rA(ctx->opcode)=20=3D=3D=20= 0)=20{=0A=20=20=20=20=20=20=20=20=20tcg_gen_movi_tl(cpu_T[0],=200);=0A=20= =20=20=20=20}=20else=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20}=0A= =20#ifdef=20DEBUG_MEMORY_ACCESSES=0A=20=20=20=20=20= gen_op_print_mem_EA();=0A@@=20-2181,7=20+2217,7=20@@=20= GEN_HANDLER(l##width,=20opc,=200xFF,=200xFF,=200x00000000,=20type)=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_ldst(l##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T1_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_LDU(width,=20opc,=20type)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-2197,8=20+2233,8=20@@=20= GEN_HANDLER(l##width##u,=20opc,=200xFF,=200xFF,=200x00000000,=20type)=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= else=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20=20=20=20=20gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20op_ldst(l##width);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20=20gen_op_store_T1_gpr(rD(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A= =20#define=20GEN_LDUX(width,=20opc2,=20opc3,=20type)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A@@=20-2211,8=20+2247,8=20@@=20= GEN_HANDLER(l##width##ux,=200x1F,=20opc2,=20opc3,=200x00000001,=20type)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20}=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20= =20=20=20gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20op_ldst(l##width);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20=20gen_op_store_T1_gpr(rD(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A= =20#define=20GEN_LDX(width,=20opc2,=20opc3,=20type)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A@@=20-2220,7=20+2256,7=20@@=20= GEN_HANDLER(l##width##x,=200x1F,=20opc2,=20opc3,=200x00000001,=20type)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_ldst(l##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T1_gpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_LDS(width,=20op,=20type)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-2266,9=20+2302,9=20@@=20= GEN_HANDLER(ld,=200x3A,=200xFF,=200xFF,=200x00000000,=20PPC_64B)=0A=20=20= =20=20=20=20=20=20=20/*=20ld=20-=20ldu=20*/=0A=20=20=20=20=20=20=20=20=20= op_ldst(ld);=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T1_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=0A=20=20=20=20=20= if=20(Rc(ctx->opcode))=0A-=20=20=20=20=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20/*=20= lq=20*/=0A=20GEN_HANDLER(lq,=200x38,=200xFF,=200xFF,=200x00000000,=20= PPC_64BX)=0A@@=20-2296,10=20+2332,10=20@@=20GEN_HANDLER(lq,=200x38,=20= 0xFF,=200xFF,=200x00000000,=20PPC_64BX)=0A=20=20=20=20=20}=0A=20=20=20=20= =20gen_addr_imm_index(ctx,=200x0F);=0A=20=20=20=20=20op_ldst(ld);=0A-=20=20= =20=20gen_op_store_T1_gpr(rd);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rd],=20cpu_T[1]);=0A=20=20=20=20=20= gen_op_addi(8);=0A=20=20=20=20=20op_ldst(ld);=0A-=20=20=20=20= gen_op_store_T1_gpr(rd=20+=201);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rd=20+=201],=20cpu_T[1]);=0A=20#endif=0A=20}=0A=20= #endif=0A@@=20-2309,7=20+2345,7=20@@=20GEN_HANDLER(lq,=200x38,=200xFF,=20= 0xFF,=200x00000000,=20PPC_64BX)=0A=20GEN_HANDLER(st##width,=20opc,=20= 0xFF,=200xFF,=200x00000000,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20op_ldst(st##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A@@=20= -2324,9=20+2360,9=20@@=20GEN_HANDLER(st##width##u,=20opc,=200xFF,=20= 0xFF,=200x00000000,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20=20=20=20=20gen_addr_imm_index(ctx,=200x03);=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20else=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20= =20=20gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr_T1(rS(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_ldst(st##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_STUX(width,=20opc2,=20opc3,=20type)=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A@@=20-2337,16=20+2373,16=20@@=20= GEN_HANDLER(st##width##ux,=200x1F,=20opc2,=20opc3,=200x00000001,=20type)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20= =20return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20}=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20op_ldst(st##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_STX(width,=20opc2,=20opc3,=20type)=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(st##width##x,=200x1F,=20= opc2,=20opc3,=200x00000001,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20gen_addr_reg_index(ctx);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_load_gpr_T1(rS(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20= cpu_gpr[rS(ctx->opcode)]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20op_ldst(st##width);=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20}=0A=20=0A@@=20-2391,10=20+2427,10=20@@=20GEN_HANDLER(std,=20= 0x3E,=200xFF,=200xFF,=200x00000000,=20PPC_64B)=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20return;=0A=20=20=20=20=20=20=20=20=20}=0A=20=20=20=20=20=20= =20=20=20gen_addr_imm_index(ctx,=200x03);=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T1(rs);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rs]);=0A=20=20=20=20=20=20=20=20=20= op_ldst(std);=0A=20=20=20=20=20=20=20=20=20gen_op_addi(8);=0A-=20=20=20=20= =20=20=20=20gen_op_load_gpr_T1(rs=20+=201);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rs=20+=201]);=0A=20=20=20=20=20=20=20=20= =20op_ldst(std);=0A=20#endif=0A=20=20=20=20=20}=20else=20{=0A@@=20= -2406,10=20+2442,10=20@@=20GEN_HANDLER(std,=200x3E,=200xFF,=200xFF,=20= 0x00000000,=20PPC_64B)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20}=0A=20=20= =20=20=20=20=20=20=20}=0A=20=20=20=20=20=20=20=20=20= gen_addr_imm_index(ctx,=200x03);=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T1(rs);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rs]);=0A=20=20=20=20=20=20=20=20=20= op_ldst(std);=0A=20=20=20=20=20=20=20=20=20if=20(Rc(ctx->opcode))=0A-=20=20= =20=20=20=20=20=20=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20= =20=20=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20}=0A= =20}=0A=20#endif=0A@@=20-2590,7=20+2626,7=20@@=20GEN_HANDLER(lwarx,=20= 0x1F,=200x14,=200x00,=200x00000001,=20PPC_RES)=0A=20=20=20=20=20= gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_lwarx();=0A-=20=20=20=20= gen_op_store_T1_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=0A=20}=0A=20=0A=20= /*=20stwcx.=20*/=0A@@=20-2599,7=20+2635,7=20@@=20GEN_HANDLER2(stwcx_,=20= "stwcx.",=200x1F,=200x16,=200x04,=200x00000000,=20PPC_RES)=0A=20=20=20=20= =20/*=20NIP=20cannot=20be=20restored=20if=20the=20memory=20exception=20= comes=20from=20an=20helper=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20= ctx->nip=20-=204);=0A=20=20=20=20=20gen_addr_reg_index(ctx);=0A-=20=20=20= =20gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= op_stwcx();=0A=20}=0A=20=0A@@=20-2620,7=20+2656,7=20@@=20= GEN_HANDLER(ldarx,=200x1F,=200x14,=200x02,=200x00000001,=20PPC_64B)=0A=20= =20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_ldarx();=0A-=20=20=20=20= gen_op_store_T1_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[1]);=0A=20}=0A=20=0A=20= /*=20stdcx.=20*/=0A@@=20-2629,7=20+2665,7=20@@=20GEN_HANDLER2(stdcx_,=20= "stdcx.",=200x1F,=200x16,=200x06,=200x00000000,=20PPC_64B)=0A=20=20=20=20= =20/*=20NIP=20cannot=20be=20restored=20if=20the=20memory=20exception=20= comes=20from=20an=20helper=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20= ctx->nip=20-=204);=0A=20=20=20=20=20gen_addr_reg_index(ctx);=0A-=20=20=20= =20gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= op_stdcx();=0A=20}=0A=20#endif=20/*=20defined(TARGET_PPC64)=20*/=0A@@=20= -2674,7=20+2710,7=20@@=20GEN_HANDLER(l##width##u,=20opc,=200xFF,=200xFF,=20= 0x00000000,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_ldst(l##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20= cpu_T[0]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20=0A=20#define=20GEN_LDUXF(width,=20opc,=20type)=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-2691,7=20= +2727,7=20@@=20GEN_HANDLER(l##width##ux,=200x1F,=200x17,=20opc,=20= 0x00000001,=20type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_ldst(l##width);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20= cpu_T[0]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20=0A=20#define=20GEN_LDXF(width,=20opc2,=20opc3,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-2745,7=20+2781,7=20= @@=20GEN_HANDLER(st##width##u,=20opc,=200xFF,=200xFF,=200x00000000,=20= type)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20= =20gen_addr_imm_index(ctx,=200);=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20op_ldst(st##width);=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_STUXF(width,=20opc,=20type)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-2762,7=20+2798,7=20@@=20= GEN_HANDLER(st##width##ux,=200x1F,=200x17,=20opc,=200x00000001,=20type)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20op_ldst(st##width);=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= }=0A=20=0A=20#define=20GEN_STXF(width,=20opc2,=20opc3,=20type)=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A@@=20-3154,8=20+3190,8=20@@=20= GEN_HANDLER(sc,=200x11,=200xFF,=200xFF,=200x03FFF01D,=20PPC_FLOW)=0A=20= /*=20tw=20*/=0A=20GEN_HANDLER(tw,=200x1F,=200x04,=200x00,=200x00000001,=20= PPC_FLOW)=0A=20{=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20= =20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= /*=20Update=20the=20nip=20since=20this=20might=20generate=20a=20trap=20= exception=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip);=0A=20=20= =20=20=20gen_op_tw(TO(ctx->opcode));=0A@@=20-3164,7=20+3200,7=20@@=20= GEN_HANDLER(tw,=200x1F,=200x04,=200x00,=200x00000001,=20PPC_FLOW)=0A=20= /*=20twi=20*/=0A=20GEN_HANDLER(twi,=200x03,=200xFF,=200xFF,=20= 0x00000000,=20PPC_FLOW)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SIMM(ctx->opcode));=0A=20=20=20=20=20/*=20= Update=20the=20nip=20since=20this=20might=20generate=20a=20trap=20= exception=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip);=0A@@=20= -3175,8=20+3211,8=20@@=20GEN_HANDLER(twi,=200x03,=200xFF,=200xFF,=20= 0x00000000,=20PPC_FLOW)=0A=20/*=20td=20*/=0A=20GEN_HANDLER(td,=200x1F,=20= 0x04,=200x02,=200x00000001,=20PPC_64B)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= /*=20Update=20the=20nip=20since=20this=20might=20generate=20a=20trap=20= exception=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip);=0A=20=20= =20=20=20gen_op_td(TO(ctx->opcode));=0A@@=20-3185,7=20+3221,7=20@@=20= GEN_HANDLER(td,=200x1F,=200x04,=200x02,=200x00000001,=20PPC_64B)=0A=20/*=20= tdi=20*/=0A=20GEN_HANDLER(tdi,=200x02,=200xFF,=200xFF,=200x00000000,=20= PPC_64B)=0A=20{=0A-=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20= =20=20tcg_gen_movi_tl(cpu_T[1],=20SIMM(ctx->opcode));=0A=20=20=20=20=20= /*=20Update=20the=20nip=20since=20this=20might=20generate=20a=20trap=20= exception=20*/=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip);=0A@@=20= -3217,7=20+3253,7=20@@=20GEN_HANDLER(mfcr,=200x1F,=200x13,=200x00,=20= 0x00000801,=20PPC_MISC)=0A=20=20=20=20=20}=20else=20{=0A=20=20=20=20=20=20= =20=20=20gen_op_load_cr();=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20mfmsr=20*/=0A@@=20-3231,7=20+3267,7=20@@=20GEN_HANDLER(mfmsr,=20= 0x1F,=200x13,=200x02,=200x001FF801,=20PPC_MISC)=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A=20=20=20=20=20gen_op_load_msr();=0A-=20=20= =20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-3263,7=20+3299,7=20@@=20static=20always_inline=20void=20= gen_op_mfspr=20(DisasContext=20*ctx)=0A=20=20=20=20=20if=20= (likely(read_cb=20!=3D=20NULL))=20{=0A=20=20=20=20=20=20=20=20=20if=20= (likely(read_cb=20!=3D=20SPR_NOACCESS))=20{=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20(*read_cb)(ctx,=20sprn);=0A-=20=20=20=20=20=20=20=20=20=20=20= =20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20= =20=20=20=20=20}=20else=20{=0A=20=20=20=20=20=20=20=20=20=20=20=20=20/*=20= Privilege=20exception=20*/=0A=20=20=20=20=20=20=20=20=20=20=20=20=20/*=20= This=20is=20a=20hack=20to=20avoid=20warnings=20when=20running=20Linux:=0A= @@=20-3309,7=20+3345,7=20@@=20GEN_HANDLER(mtcrf,=200x1F,=200x10,=200x04,=20= 0x00000801,=20PPC_MISC)=0A=20{=0A=20=20=20=20=20uint32_t=20crm,=20crn;=0A= =20=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= crm=20=3D=20CRM(ctx->opcode);=0A=20=20=20=20=20if=20(likely((ctx->opcode=20= &=200x00100000)=20||=20(crm=20^=20(crm=20-=201))=20=3D=3D=200))=20{=0A=20= =20=20=20=20=20=20=20=20crn=20=3D=20ffs(crm);=0A@@=20-3332,7=20+3368,7=20= @@=20GEN_HANDLER(mtmsrd,=200x1F,=200x12,=200x05,=200x001EF801,=20= PPC_64B)=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20= =20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(ctx->opcode=20&=200x00010000)=20{=0A=20=20=20=20=20=20=20=20=20/*=20= Special=20form=20that=20does=20not=20need=20any=20synchronisation=20*/=0A= =20=20=20=20=20=20=20=20=20gen_op_update_riee();=0A@@=20-3360,7=20= +3396,7=20@@=20GEN_HANDLER(mtmsr,=200x1F,=200x12,=200x04,=200x001FF801,=20= PPC_MISC)=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20= =20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= if=20(ctx->opcode=20&=200x00010000)=20{=0A=20=20=20=20=20=20=20=20=20/*=20= Special=20form=20that=20does=20not=20need=20any=20synchronisation=20*/=0A= =20=20=20=20=20=20=20=20=20gen_op_update_riee();=0A@@=20-3399,7=20= +3435,7=20@@=20GEN_HANDLER(mtspr,=200x1F,=200x13,=200x0E,=200x00000001,=20= PPC_MISC)=0A=20=20=20=20=20=20=20=20=20write_cb=20=3D=20= ctx->spr_cb[sprn].uea_write;=0A=20=20=20=20=20if=20(likely(write_cb=20!=3D= =20NULL))=20{=0A=20=20=20=20=20=20=20=20=20if=20(likely(write_cb=20!=3D=20= SPR_NOACCESS))=20{=0A-=20=20=20=20=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20=20=20=20=20=20=20=20= =20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20(*write_cb)(ctx,=20sprn);=0A=20=20=20=20=20=20=20= =20=20}=20else=20{=0A=20=20=20=20=20=20=20=20=20=20=20=20=20/*=20= Privilege=20exception=20*/=0A@@=20-3614,7=20+3650,7=20@@=20= GEN_HANDLER(mfsr,=200x1F,=200x13,=200x12,=200x0010F801,=20PPC_SEGMENT)=0A= =20=20=20=20=20}=0A=20=20=20=20=20tcg_gen_movi_tl(cpu_T[1],=20= SR(ctx->opcode));=0A=20=20=20=20=20gen_op_load_sr();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-3628,10=20+3664,10=20@@=20GEN_HANDLER(mfsrin,=200x1F,=20= 0x13,=200x14,=200x001F0001,=20PPC_SEGMENT)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_srli_T1(28);=0A=20=20=20=20=20gen_op_load_sr();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-3645,7=20+3681,7=20@@=20GEN_HANDLER(mtsr,=200x1F,=200x12,=20= 0x06,=200x0010F801,=20PPC_SEGMENT)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SR(ctx->opcode));=0A=20=20=20=20=20= gen_op_store_sr();=0A=20#endif=0A@@=20-3661,8=20+3697,8=20@@=20= GEN_HANDLER(mtsrin,=200x1F,=200x12,=200x07,=200x001F0001,=20PPC_SEGMENT)=0A= =20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20= =20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_srli_T1(28);=0A=20=20=20=20=20gen_op_store_sr();=0A=20#endif=0A@@=20= -3682,7=20+3718,7=20@@=20GEN_HANDLER2(mfsr_64b,=20"mfsr",=200x1F,=20= 0x13,=200x12,=200x0010F801,=20PPC_SEGMENT_64B)=0A=20=20=20=20=20}=0A=20=20= =20=20=20tcg_gen_movi_tl(cpu_T[1],=20SR(ctx->opcode));=0A=20=20=20=20=20= gen_op_load_slb();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20= #endif=0A=20}=0A=20=0A@@=20-3697,10=20+3733,10=20@@=20= GEN_HANDLER2(mfsrin_64b,=20"mfsrin",=200x1F,=200x13,=200x14,=20= 0x001F0001,=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20= =20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_srli_T1(28);=0A=20=20=20=20=20gen_op_load_slb();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-3714,7=20+3750,7=20@@=20GEN_HANDLER2(mtsr_64b,=20"mtsr",=20= 0x1F,=200x12,=200x06,=200x0010F801,=20PPC_SEGMENT_64B)=0A=20=20=20=20=20=20= =20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20= =20=20=20=20}=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20= =20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20= =20tcg_gen_movi_tl(cpu_T[1],=20SR(ctx->opcode));=0A=20=20=20=20=20= gen_op_store_slb();=0A=20#endif=0A@@=20-3731,8=20+3767,8=20@@=20= GEN_HANDLER2(mtsrin_64b,=20"mtsrin",=200x1F,=200x12,=200x07,=20= 0x001F0001,=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20= =20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_srli_T1(28);=0A=20=20=20=20=20gen_op_store_slb();=0A=20#endif=0A= @@=20-3765,7=20+3801,7=20@@=20GEN_HANDLER(tlbie,=200x1F,=200x12,=200x09,=20= 0x03FF0001,=20PPC_MEM_TLBIE)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20#if=20= defined(TARGET_PPC64)=0A=20=20=20=20=20if=20(ctx->sf_mode)=0A=20=20=20=20= =20=20=20=20=20gen_op_tlbie_64();=0A@@=20-3817,7=20+3853,7=20@@=20= GEN_HANDLER(slbie,=200x1F,=200x12,=200x0D,=200x03FF0001,=20PPC_SLBI)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_slbie();=0A=20#endif=0A=20}=0A@@=20-3840,7=20+3876,7=20@@=20= GEN_HANDLER(eciwx,=200x1F,=200x16,=200x0D,=200x00000001,=20PPC_EXTERN)=0A= =20=20=20=20=20/*=20Should=20check=20EAR[E]=20&=20alignment=20!=20*/=0A=20= =20=20=20=20gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_eciwx();=0A-=20=20= =20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20ecowx=20*/=0A@@=20-3848,7=20+3884,7=20@@=20GEN_HANDLER(ecowx,=20= 0x1F,=200x16,=200x09,=200x00000001,=20PPC_EXTERN)=0A=20{=0A=20=20=20=20=20= /*=20Should=20check=20EAR[E]=20&=20alignment=20!=20*/=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= op_ecowx();=0A=20}=0A=20=0A@@=20-3856,9=20+3892,9=20@@=20= GEN_HANDLER(ecowx,=200x1F,=200x16,=200x09,=200x00000001,=20PPC_EXTERN)=0A= =20/*=20abs=20-=20abs.=20*/=0A=20GEN_HANDLER(abs,=200x1F,=200x08,=20= 0x0B,=200x0000F800,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_abs();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-3866,9=20+3902,9=20@@=20= GEN_HANDLER(abs,=200x1F,=200x08,=200x0B,=200x0000F800,=20PPC_POWER_BR)=0A= =20/*=20abso=20-=20abso.=20*/=0A=20GEN_HANDLER(abso,=200x1F,=200x08,=20= 0x1B,=200x0000F800,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_abso();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-3876,19=20+3912,19=20@@=20= GEN_HANDLER(abso,=200x1F,=200x08,=200x1B,=200x0000F800,=20PPC_POWER_BR)=0A= =20/*=20clcs=20*/=0A=20GEN_HANDLER(clcs,=200x1F,=200x10,=200x13,=20= 0x0000F800,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_clcs();=0A=20=20=20=20=20/*=20Rc=3D1=20sets=20CR0=20to=20an=20= undefined=20state=20*/=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20div=20-=20div.=20*/=0A=20GEN_HANDLER(div,=200x1F,=200x0B,=200x0A,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_div();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-3896,10=20+3932,10=20@@=20= GEN_HANDLER(div,=200x1F,=200x0B,=200x0A,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20divo=20-=20divo.=20*/=0A=20GEN_HANDLER(divo,=200x1F,=200x0B,=20= 0x1A,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_divo();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-3907,10=20+3943,10=20@@=20= GEN_HANDLER(divo,=200x1F,=200x0B,=200x1A,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20divs=20-=20divs.=20*/=0A=20GEN_HANDLER(divs,=200x1F,=200x0B,=20= 0x0B,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_divs();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-3918,10=20+3954,10=20@@=20= GEN_HANDLER(divs,=200x1F,=200x0B,=200x0B,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20divso=20-=20divso.=20*/=0A=20GEN_HANDLER(divso,=200x1F,=200x0B,=20= 0x1B,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_divso();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-3929,10=20+3965,10=20@@=20= GEN_HANDLER(divso,=200x1F,=200x0B,=200x1B,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20doz=20-=20doz.=20*/=0A=20GEN_HANDLER(doz,=200x1F,=200x08,=20= 0x08,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_doz();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-3940,10=20+3976,10=20@@=20= GEN_HANDLER(doz,=200x1F,=200x08,=200x08,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20dozo=20-=20dozo.=20*/=0A=20GEN_HANDLER(dozo,=200x1F,=200x08,=20= 0x18,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_dozo();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-3951,10=20+3987,10=20@@=20= GEN_HANDLER(dozo,=200x1F,=200x08,=200x18,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20dozi=20*/=0A=20GEN_HANDLER(dozi,=200x09,=200xFF,=200xFF,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SIMM(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_doz();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20= }=0A=20=0A=20/*=20As=20lscbx=20load=20from=20memory=20byte=20after=20= byte,=20it's=20always=20endian=20safe.=0A@@=20-4001,10=20+4037,10=20@@=20= GEN_HANDLER(lscbx,=200x1F,=200x15,=200x08,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20maskg=20-=20maskg.=20*/=0A=20GEN_HANDLER(maskg,=200x1F,=200x1D,=20= 0x00,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_maskg();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4012,11=20+4048,11=20@@=20= GEN_HANDLER(maskg,=200x1F,=200x1D,=200x00,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20maskir=20-=20maskir.=20*/=0A=20GEN_HANDLER(maskir,=200x1F,=20= 0x1D,=200x10,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T2(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_maskir();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4024,10=20+4060,10=20@@=20= GEN_HANDLER(maskir,=200x1F,=200x1D,=200x10,=200x00000000,=20= PPC_POWER_BR)=0A=20/*=20mul=20-=20mul.=20*/=0A=20GEN_HANDLER(mul,=20= 0x1F,=200x0B,=200x03,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_mul();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4035,10=20+4071,10=20@@=20= GEN_HANDLER(mul,=200x1F,=200x0B,=200x03,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20mulo=20-=20mulo.=20*/=0A=20GEN_HANDLER(mulo,=200x1F,=200x0B,=20= 0x13,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_mulo();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4046,9=20+4082,9=20@@=20= GEN_HANDLER(mulo,=200x1F,=200x0B,=200x13,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20nabs=20-=20nabs.=20*/=0A=20GEN_HANDLER(nabs,=200x1F,=200x08,=20= 0x0F,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_nabs();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4056,9=20+4092,9=20@@=20= GEN_HANDLER(nabs,=200x1F,=200x08,=200x0F,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20nabso=20-=20nabso.=20*/=0A=20GEN_HANDLER(nabso,=200x1F,=200x08,=20= 0x1F,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_nabso();=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4070,11=20+4106,11=20@@=20= GEN_HANDLER(rlmi,=200x16,=200xFF,=200xFF,=200x00000000,=20PPC_POWER_BR)=0A= =20=0A=20=20=20=20=20mb=20=3D=20MB(ctx->opcode);=0A=20=20=20=20=20me=20=3D= =20ME(ctx->opcode);=0A-=20=20=20=20gen_op_load_gpr_T0(rS(ctx->opcode));=0A= -=20=20=20=20gen_op_load_gpr_T1(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T2(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_rlmi(MASK(mb,=20me),=20~MASK(mb,=20me));=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4082,11=20+4118,11=20@@=20= GEN_HANDLER(rlmi,=200x16,=200xFF,=200xFF,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20rrib=20-=20rrib.=20*/=0A=20GEN_HANDLER(rrib,=200x1F,=200x19,=20= 0x10,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T2(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_rrib();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4094,10=20+4130,10=20@@=20= GEN_HANDLER(rrib,=200x1F,=200x19,=200x10,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sle=20-=20sle.=20*/=0A=20GEN_HANDLER(sle,=200x1F,=200x19,=20= 0x04,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sle();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4105,10=20+4141,10=20@@=20= GEN_HANDLER(sle,=200x1F,=200x19,=200x04,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sleq=20-=20sleq.=20*/=0A=20GEN_HANDLER(sleq,=200x1F,=200x19,=20= 0x06,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sleq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4116,10=20+4152,10=20@@=20= GEN_HANDLER(sleq,=200x1F,=200x19,=200x06,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sliq=20-=20sliq.=20*/=0A=20GEN_HANDLER(sliq,=200x1F,=200x18,=20= 0x05,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SH(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_sle();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4127,10=20+4163,10=20@@=20= GEN_HANDLER(sliq,=200x1F,=200x18,=200x05,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20slliq=20-=20slliq.=20*/=0A=20GEN_HANDLER(slliq,=200x1F,=200x18,=20= 0x07,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SH(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_sleq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4138,10=20+4174,10=20@@=20= GEN_HANDLER(slliq,=200x1F,=200x18,=200x07,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sllq=20-=20sllq.=20*/=0A=20GEN_HANDLER(sllq,=200x1F,=200x18,=20= 0x06,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sllq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4149,10=20+4185,10=20@@=20= GEN_HANDLER(sllq,=200x1F,=200x18,=200x06,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20slq=20-=20slq.=20*/=0A=20GEN_HANDLER(slq,=200x1F,=200x18,=20= 0x04,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_slq();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4160,10=20+4196,10=20@@=20= GEN_HANDLER(slq,=200x1F,=200x18,=200x04,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sraiq=20-=20sraiq.=20*/=0A=20GEN_HANDLER(sraiq,=200x1F,=200x18,=20= 0x1D,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SH(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_sraq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4171,10=20+4207,10=20@@=20= GEN_HANDLER(sraiq,=200x1F,=200x18,=200x1D,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sraq=20-=20sraq.=20*/=0A=20GEN_HANDLER(sraq,=200x1F,=200x18,=20= 0x1C,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sraq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4182,10=20+4218,10=20@@=20= GEN_HANDLER(sraq,=200x1F,=200x18,=200x1C,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sre=20-=20sre.=20*/=0A=20GEN_HANDLER(sre,=200x1F,=200x19,=20= 0x14,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sre();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4193,10=20+4229,10=20@@=20= GEN_HANDLER(sre,=200x1F,=200x19,=200x14,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20srea=20-=20srea.=20*/=0A=20GEN_HANDLER(srea,=200x1F,=200x19,=20= 0x1C,=200x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_srea();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4204,10=20+4240,10=20@@=20= GEN_HANDLER(srea,=200x1F,=200x19,=200x1C,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sreq=20*/=0A=20GEN_HANDLER(sreq,=200x1F,=200x19,=200x16,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_sreq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4215,10=20+4251,10=20@@=20= GEN_HANDLER(sreq,=200x1F,=200x19,=200x16,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20sriq=20*/=0A=20GEN_HANDLER(sriq,=200x1F,=200x18,=200x15,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SH(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_srq();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4226,11=20+4262,11=20@@=20= GEN_HANDLER(sriq,=200x1F,=200x18,=200x15,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20srliq=20*/=0A=20GEN_HANDLER(srliq,=200x1F,=200x18,=200x17,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= tcg_gen_movi_tl(cpu_T[1],=20SH(ctx->opcode));=0A=20=20=20=20=20= gen_op_POWER_srlq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4238,10=20+4274,10=20@@=20= GEN_HANDLER(srliq,=200x1F,=200x18,=200x17,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20srlq=20*/=0A=20GEN_HANDLER(srlq,=200x1F,=200x18,=200x16,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_srlq();=0A-=20=20=20=20= gen_op_store_T0_gpr(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20= if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A=20}=0A@@=20-4249,10=20+4285,10=20@@=20= GEN_HANDLER(srlq,=200x1F,=200x18,=200x16,=200x00000000,=20PPC_POWER_BR)=0A= =20/*=20srq=20*/=0A=20GEN_HANDLER(srq,=200x1F,=200x18,=200x14,=20= 0x00000000,=20PPC_POWER_BR)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_POWER_srq();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20if=20(unlikely(Rc(ctx->opcode)=20!=3D=200))=0A=20=20=20=20=20=20= =20=20=20gen_set_Rc0(ctx);=0A=20}=0A@@=20-4282,9=20+4318,9=20@@=20= GEN_HANDLER(mfrom,=200x1F,=200x09,=200x08,=200x03E0F801,=20PPC_602_SPEC)=0A= =20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20= =20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_602_mfrom();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20= #endif=0A=20}=0A=20=0A@@=20-4299,7=20+4335,7=20@@=20= GEN_HANDLER2(tlbld_6xx,=20"tlbld",=200x1F,=200x12,=200x1E,=200x03FF0001,=20= PPC_6xx_TLB)=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVOPC(ctx);=0A=20=20= =20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_6xx_tlbld();=0A=20#endif=0A=20}=0A@@=20-4314,7=20+4350,7=20@@=20= GEN_HANDLER2(tlbli_6xx,=20"tlbli",=200x1F,=200x12,=200x1F,=200x03FF0001,=20= PPC_6xx_TLB)=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_PRIVOPC(ctx);=0A=20=20= =20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_6xx_tlbli();=0A=20#endif=0A=20}=0A@@=20-4330,7=20+4366,7=20@@=20= GEN_HANDLER2(tlbld_74xx,=20"tlbld",=200x1F,=200x12,=200x1E,=20= 0x03FF0001,=20PPC_74xx_TLB)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_74xx_tlbld();=0A=20#endif=0A=20}=0A@@=20-4345,7=20+4381,7=20@@=20= GEN_HANDLER2(tlbli_74xx,=20"tlbli",=200x1F,=200x12,=200x1F,=20= 0x03FF0001,=20PPC_74xx_TLB)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20= =20}=0A-=20=20=20=20gen_op_load_gpr_T0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_74xx_tlbli();=0A=20#endif=0A=20}=0A@@=20-4391,9=20+4427,9=20@@=20= GEN_HANDLER(mfsri,=200x1F,=200x13,=200x13,=200x00000001,=20PPC_POWER)=0A=20= =0A=20=20=20=20=20gen_addr_reg_index(ctx);=0A=20=20=20=20=20= gen_op_POWER_mfsri();=0A-=20=20=20=20gen_op_store_T0_gpr(rd);=0A+=20=20=20= =20tcg_gen_mov_tl(cpu_gpr[rd],=20cpu_T[0]);=0A=20=20=20=20=20if=20(ra=20= !=3D=200=20&&=20ra=20!=3D=20rd)=0A-=20=20=20=20=20=20=20=20= gen_op_store_T1_gpr(ra);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[1]);=0A=20#endif=0A=20}=0A=20=0A@@=20= -4408,7=20+4444,7=20@@=20GEN_HANDLER(rac,=200x1F,=200x12,=200x19,=20= 0x00000001,=20PPC_POWER)=0A=20=20=20=20=20}=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=0A=20=20=20=20=20gen_op_POWER_rac();=0A-=20=20=20= =20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-4479,7=20+4515,7=20@@=20GEN_HANDLER(lfqu,=200x39,=200xFF,=20= 0xFF,=200x00000003,=20PPC_POWER2)=0A=20=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=0A=20=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A=20=20=20=20=20if=20(ra=20= !=3D=200)=0A-=20=20=20=20=20=20=20=20gen_op_store_T0_gpr(ra);=0A+=20=20=20= =20=20=20=20=20tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20lfqux=20*/=0A@@=20-4494,7=20+4530,7=20@@=20GEN_HANDLER(lfqux,=20= 0x1F,=200x17,=200x19,=200x00000001,=20PPC_POWER2)=0A=20=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=0A=20=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A=20=20=20=20=20if=20(ra=20= !=3D=200)=0A-=20=20=20=20=20=20=20=20gen_op_store_T0_gpr(ra);=0A+=20=20=20= =20=20=20=20=20tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A=20=0A=20= /*=20lfqx=20*/=0A@@=20-4531,7=20+4567,7=20@@=20GEN_HANDLER(stfqu,=20= 0x3D,=200xFF,=200xFF,=200x00000003,=20PPC_POWER2)=0A=20=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A=20=20=20=20=20= op_POWER2_stfq();=0A=20=20=20=20=20if=20(ra=20!=3D=200)=0A-=20=20=20=20=20= =20=20=20gen_op_store_T0_gpr(ra);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A=20=0A=20/*=20stfqux=20= */=0A@@=20-4546,7=20+4582,7=20@@=20GEN_HANDLER(stfqux,=200x1F,=200x17,=20= 0x1D,=200x00000001,=20PPC_POWER2)=0A=20=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A=20=20=20=20=20= op_POWER2_stfq();=0A=20=20=20=20=20if=20(ra=20!=3D=200)=0A-=20=20=20=20=20= =20=20=20gen_op_store_T0_gpr(ra);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A=20=0A=20/*=20stfqx=20= */=0A@@=20-4594,8=20+4630,8=20@@=20static=20always_inline=20void=20= gen_405_mulladd_insn=20(DisasContext=20*ctx,=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20int=20opc2,=20int=20opc3,=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= int=20ra,=20int=20rb,=20int=20rt,=20int=20Rc)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(ra);=0A-=20=20=20=20gen_op_load_gpr_T1(rb);=0A+=20=20=20= =20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[ra]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rb]);=0A=20=20=20=20=20switch=20(opc3=20= &=200x0D)=20{=0A=20=20=20=20=20case=200x05:=0A=20=20=20=20=20=20=20=20=20= /*=20macchw=20=20=20=20-=20macchw.=20=20=20=20-=20macchwo=20=20=20-=20= macchwo.=20=20=20*/=0A@@=20-4646,7=20+4682,7=20@@=20static=20= always_inline=20void=20gen_405_mulladd_insn=20(DisasContext=20*ctx,=0A=20= =20=20=20=20}=0A=20=20=20=20=20if=20(opc2=20&=200x04)=20{=0A=20=20=20=20=20= =20=20=20=20/*=20(n)multiply-and-accumulate=20(0x0C=20-=200x0E)=20*/=0A-=20= =20=20=20=20=20=20=20gen_op_load_gpr_T2(rt);=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[2],=20cpu_gpr[rt]);=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_T[0]);=0A=20=20=20=20=20=20=20=20=20= gen_op_405_add_T0_T2();=0A=20=20=20=20=20}=0A@@=20-4664,7=20+4700,7=20@@=20= static=20always_inline=20void=20gen_405_mulladd_insn=20(DisasContext=20= *ctx,=0A=20=20=20=20=20=20=20=20=20else=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20gen_op_405_check_satu();=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_store_T0_gpr(rt);=0A+=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rt],=20= cpu_T[0]);=0A=20=20=20=20=20if=20(unlikely(Rc)=20!=3D=200)=20{=0A=20=20=20= =20=20=20=20=20=20/*=20Update=20Rc0=20*/=0A=20=20=20=20=20=20=20=20=20= gen_set_Rc0(ctx);=0A@@=20-4778,7=20+4814,7=20@@=20GEN_HANDLER(mfdcr,=20= 0x1F,=200x03,=200x0A,=200x00000001,=20PPC_DCR)=0A=20=20=20=20=20}=0A=20=20= =20=20=20tcg_gen_movi_tl(cpu_T[0],=20dcrn);=0A=20=20=20=20=20= gen_op_load_dcr();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20= #endif=0A=20}=0A=20=0A@@=20-4795,7=20+4831,7=20@@=20GEN_HANDLER(mtdcr,=20= 0x1F,=200x03,=200x0E,=200x00000001,=20PPC_DCR)=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A=20=20=20=20=20tcg_gen_movi_tl(cpu_T[0],=20= dcrn);=0A-=20=20=20=20gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_store_dcr();=0A=20#endif=0A=20}=0A@@=20-4811,9=20+4847,9=20@@=20= GEN_HANDLER(mfdcrx,=200x1F,=200x03,=200x08,=200x00000000,=20PPC_DCRX)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_load_dcr();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20/*=20Note:=20Rc=20update=20flag=20set=20leads=20to=20undefined=20= state=20of=20Rc0=20*/=0A=20#endif=0A=20}=0A@@=20-4829,8=20+4865,8=20@@=20= GEN_HANDLER(mtdcrx,=200x1F,=200x03,=200x0C,=200x00000000,=20PPC_DCRX)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_PRIVREG(ctx);=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_store_dcr();=0A=20=20=20=20=20/*=20Note:=20Rc=20update=20flag=20= set=20leads=20to=20undefined=20state=20of=20Rc0=20*/=0A=20#endif=0A@@=20= -4839,17=20+4875,17=20@@=20GEN_HANDLER(mtdcrx,=200x1F,=200x03,=200x0C,=20= 0x00000000,=20PPC_DCRX)=0A=20/*=20mfdcrux=20(PPC=20460)=20:=20user-mode=20= access=20to=20DCR=20*/=0A=20GEN_HANDLER(mfdcrux,=200x1F,=200x03,=200x09,=20= 0x00000000,=20PPC_DCRUX)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_load_dcr();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20/*=20Note:=20Rc=20update=20flag=20set=20leads=20to=20undefined=20= state=20of=20Rc0=20*/=0A=20}=0A=20=0A=20/*=20mtdcrux=20(PPC=20460)=20:=20= user-mode=20access=20to=20DCR=20*/=0A=20GEN_HANDLER(mtdcrux,=200x1F,=20= 0x03,=200x0D,=200x00000000,=20PPC_DCRUX)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_store_dcr();=0A=20=20=20=20=20/*=20Note:=20Rc=20update=20flag=20= set=20leads=20to=20undefined=20state=20of=20Rc0=20*/=0A=20}=0A@@=20= -4880,7=20+4916,7=20@@=20GEN_HANDLER(dcread,=200x1F,=200x06,=200x0F,=20= 0x00000001,=20PPC_4xx_COMMON)=0A=20=20=20=20=20}=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_ldst(lwz);=0A-=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-4998,14=20+5034,14=20@@=20GEN_HANDLER2(tlbre_40x,=20"tlbre",=20= 0x1F,=200x12,=200x1D,=200x00000001,=20PPC_40x_TLB)=0A=20=20=20=20=20}=0A=20= =20=20=20=20switch=20(rB(ctx->opcode))=20{=0A=20=20=20=20=20case=200:=0A= -=20=20=20=20=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20= =20=20=20=20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20= =20=20=20=20=20=20=20=20gen_op_4xx_tlbre_hi();=0A-=20=20=20=20=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20=20= =20=20=20break;=0A=20=20=20=20=20case=201:=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20=20= =20=20=20gen_op_4xx_tlbre_lo();=0A-=20=20=20=20=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20=20= =20=20=20break;=0A=20=20=20=20=20default:=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_INVAL(ctx);=0A@@=20-5028,7=20+5064,7=20@@=20= GEN_HANDLER2(tlbsx_40x,=20"tlbsx",=200x1F,=200x12,=200x1C,=200x00000000,=20= PPC_40x_TLB)=0A=20=20=20=20=20gen_op_4xx_tlbsx();=0A=20=20=20=20=20if=20= (Rc(ctx->opcode))=0A=20=20=20=20=20=20=20=20=20gen_op_4xx_tlbsx_check();=0A= -=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-5044,13=20+5080,13=20@@=20GEN_HANDLER2(tlbwe_40x,=20"tlbwe",=20= 0x1F,=200x12,=200x1E,=200x00000001,=20PPC_40x_TLB)=0A=20=20=20=20=20}=0A=20= =20=20=20=20switch=20(rB(ctx->opcode))=20{=0A=20=20=20=20=20case=200:=0A= -=20=20=20=20=20=20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20= =20=20=20=20=20gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= =20=20=20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20= =20=20=20=20=20=20=20gen_op_4xx_tlbwe_hi();=0A=20=20=20=20=20=20=20=20=20= break;=0A=20=20=20=20=20case=201:=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20= =20=20=20=20=20gen_op_4xx_tlbwe_lo();=0A=20=20=20=20=20=20=20=20=20= break;=0A=20=20=20=20=20default:=0A@@=20-5075,9=20+5111,9=20@@=20= GEN_HANDLER2(tlbre_440,=20"tlbre",=200x1F,=200x12,=200x1D,=200x00000001,=20= PPC_BOOKE)=0A=20=20=20=20=20case=200:=0A=20=20=20=20=20case=201:=0A=20=20= =20=20=20case=202:=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20=20= =20=20=20gen_op_440_tlbre(rB(ctx->opcode));=0A-=20=20=20=20=20=20=20=20= gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20=20=20=20=20=20= =20=20=20break;=0A=20=20=20=20=20default:=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_INVAL(ctx);=0A@@=20-5100,7=20+5136,7=20@@=20= GEN_HANDLER2(tlbsx_440,=20"tlbsx",=200x1F,=200x12,=200x1C,=200x00000000,=20= PPC_BOOKE)=0A=20=20=20=20=20gen_op_440_tlbsx();=0A=20=20=20=20=20if=20= (Rc(ctx->opcode))=0A=20=20=20=20=20=20=20=20=20gen_op_4xx_tlbsx_check();=0A= -=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20#endif=0A=20}=0A= =20=0A@@=20-5118,8=20+5154,8=20@@=20GEN_HANDLER2(tlbwe_440,=20"tlbwe",=20= 0x1F,=200x12,=200x1E,=200x00000001,=20PPC_BOOKE)=0A=20=20=20=20=20case=20= 0:=0A=20=20=20=20=20case=201:=0A=20=20=20=20=20case=202:=0A-=20=20=20=20=20= =20=20=20gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T1(rS(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20=20=20= =20=20tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rS(ctx->opcode)]);=0A=20=20=20=20= =20=20=20=20=20gen_op_440_tlbwe(rB(ctx->opcode));=0A=20=20=20=20=20=20=20= =20=20break;=0A=20=20=20=20=20default:=0A@@=20-5139,7=20+5175,7=20@@=20= GEN_HANDLER(wrtee,=200x1F,=200x03,=200x04,=200x000FFC01,=20PPC_WRTEE)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_PRIVOPC(ctx);=0A=20=20=20=20=20=20=20=20= =20return;=0A=20=20=20=20=20}=0A-=20=20=20=20= gen_op_load_gpr_T0(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rD(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_wrte();=0A=20=20=20=20=20/*=20Stop=20translation=20to=20have=20a=20= chance=20to=20raise=20an=20exception=0A=20=20=20=20=20=20*=20if=20we=20= just=20set=20msr_ee=20to=201=0A@@=20-5171,10=20+5207,10=20@@=20= GEN_HANDLER(wrteei,=200x1F,=200x03,=200x05,=200x000EFC01,=20PPC_WRTEE)=0A= =20/*=20dlmzb=20*/=0A=20GEN_HANDLER(dlmzb,=200x1F,=200x0E,=200x02,=20= 0x00000000,=20PPC_440_SPEC)=0A=20{=0A-=20=20=20=20= gen_op_load_gpr_T0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_440_dlmzb();=0A-=20=20=20=20gen_op_store_T0_gpr(rA(ctx->opcode));=0A= +=20=20=20=20tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)],=20cpu_T[0]);=0A=20=20= =20=20=20gen_op_store_xer_bc();=0A=20=20=20=20=20if=20(Rc(ctx->opcode))=20= {=0A=20=20=20=20=20=20=20=20=20gen_op_440_dlmzb_update_Rc();=0A@@=20= -5263,36=20+5299,31=20@@=20GEN_VR_STX(vxl,=200x07,=200x0F);=0A=20=0A=20= /***=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20SPE=20extension=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20***/=0A=20/*=20Register=20= moves=20*/=0A-#if=20!defined(TARGET_PPC64)=0A=20=0A= -GEN32(gen_op_load_gpr64_T0,=20gen_op_load_gpr64_T0_gpr);=0A= -GEN32(gen_op_load_gpr64_T1,=20gen_op_load_gpr64_T1_gpr);=0A-#if=200=20= //=20unused=0A-GEN32(gen_op_load_gpr64_T2,=20gen_op_load_gpr64_T2_gpr);=0A= -#endif=0A-=0A-GEN32(gen_op_store_T0_gpr64,=20= gen_op_store_T0_gpr64_gpr);=0A-GEN32(gen_op_store_T1_gpr64,=20= gen_op_store_T1_gpr64_gpr);=0A-#if=200=20//=20unused=0A= -GEN32(gen_op_store_T2_gpr64,=20gen_op_store_T2_gpr64_gpr);=0A-#endif=0A= -=0A-#else=20/*=20!defined(TARGET_PPC64)=20*/=0A-=0A-/*=20No=20specific=20= load/store=20functions:=20GPRs=20are=20already=2064=20bits=20*/=0A= -#define=20gen_op_load_gpr64_T0=20gen_op_load_gpr_T0=0A-#define=20= gen_op_load_gpr64_T1=20gen_op_load_gpr_T1=0A-#if=200=20//=20unused=0A= -#define=20gen_op_load_gpr64_T2=20gen_op_load_gpr_T2=0A+static=20= always_inline=20void=20gen_load_gpr64(TCGv=20t,=20int=20reg)=20{=0A+#if=20= defined(TARGET_PPC64)=0A+=20=20=20=20tcg_gen_mov_i64(t,=20cpu_gpr[reg]);=0A= +#else=0A+=20=20=20=20tcg_gen_extu_i32_i64(t,=20cpu_gprh[reg]);=0A+=20=20= =20=20tcg_gen_shli_i64(t,=20t,=2032);=0A+=20=20=20=20TCGv=20tmp=20=3D=20= tcg_temp_local_new(TCG_TYPE_I64);=0A+=20=20=20=20= tcg_gen_extu_i32_i64(tmp,=20cpu_gpr[reg]);=0A+=20=20=20=20= tcg_gen_or_i64(t,=20t,=20tmp);=0A+=20=20=20=20tcg_temp_free(tmp);=0A=20= #endif=0A+}=0A=20=0A-#define=20gen_op_store_T0_gpr64=20= gen_op_store_T0_gpr=0A-#define=20gen_op_store_T1_gpr64=20= gen_op_store_T1_gpr=0A-#if=200=20//=20unused=0A-#define=20= gen_op_store_T2_gpr64=20gen_op_store_T2_gpr=0A+static=20always_inline=20= void=20gen_store_gpr64(int=20reg,=20TCGv=20t)=20{=0A+#if=20= defined(TARGET_PPC64)=0A+=20=20=20=20tcg_gen_mov_i64(cpu_gpr[reg],=20t);=0A= +#else=0A+=20=20=20=20tcg_gen_trunc_i64_i32(cpu_gpr[reg],=20t);=0A+=20=20= =20=20TCGv=20tmp=20=3D=20tcg_temp_local_new(TCG_TYPE_I64);=0A+=20=20=20=20= tcg_gen_shri_i64(tmp,=20t,=2032);=0A+=20=20=20=20= tcg_gen_trunc_i64_i32(cpu_gprh[reg],=20tmp);=0A+=20=20=20=20= tcg_temp_free(tmp);=0A=20#endif=0A-=0A-#endif=20/*=20= !defined(TARGET_PPC64)=20*/=0A+}=0A=20=0A=20#define=20GEN_SPE(name0,=20= name1,=20opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20\=0A=20GEN_HANDLER(name0##_##name1,=20= 0x04,=20opc2,=20opc3,=20inval,=20type)=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A@@=20-5317,7=20+5348,7=20@@=20static=20= always_inline=20void=20gen_addr_spe_imm_index=20(DisasContext=20*ctx,=20= int=20sh)=0A=20=20=20=20=20if=20(rA(ctx->opcode)=20=3D=3D=200)=20{=0A=20=20= =20=20=20=20=20=20=20tcg_gen_movi_tl(cpu_T[0],=20simm=20<<=20sh);=0A=20=20= =20=20=20}=20else=20{=0A-=20=20=20=20=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A+=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A=20=20=20=20=20=20= =20=20=20if=20(likely(simm=20!=3D=200))=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20gen_op_addi(simm=20<<=20sh);=0A=20=20=20=20=20}=0A@@=20-5342,7=20= +5373,7=20@@=20static=20always_inline=20void=20gen_evl##name=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20gen_addr_spe_imm_index(ctx,=20sh);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= op_spe_ldst(spe_l##name);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T1_gpr64(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= +=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[1]);=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20}=0A=20=0A=20#define=20GEN_SPE_LDX(name)=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20= -5354,7=20+5385,7=20@@=20static=20always_inline=20void=20= gen_evl##name##x=20(DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20= gen_addr_reg_index(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20op_spe_ldst(spe_l##name);=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20= =20=20=20gen_op_store_T1_gpr64(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[1]);=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20=0A=20#define=20GEN_SPEOP_LD(name,=20sh)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-5370,7=20= +5401,7=20@@=20static=20always_inline=20void=20gen_evst##name=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20=20=20=20=20return;=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20gen_addr_spe_imm_index(ctx,=20sh);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T1(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[1],=20rS(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20op_spe_ldst(spe_st##name);=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A@@=20-5382,7=20= +5413,7=20@@=20static=20always_inline=20void=20gen_evst##name##x=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20=20=20=20=20return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A=20=20=20=20=20gen_addr_reg_index(ctx);=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20= =20gen_op_load_gpr64_T1(rS(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[1],=20rS(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20op_spe_ldst(spe_st##name);=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A@@=20-5403,10=20= +5434,10=20@@=20static=20always_inline=20void=20gen_##name=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_NO_AP(ctx);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20= =20=20=20=20=20=20=20return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= =20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr64_T0(rA(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T1(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20rA(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20gen_load_gpr64(cpu_T64[1],=20rB(ctx->opcode));=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20= =20=20=20gen_op_store_T0_gpr64(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A=20=0A=20#define=20GEN_SPEOP_ARITH1(name)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-5416,9=20= +5447,9=20@@=20static=20always_inline=20void=20gen_##name=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_NO_AP(ctx);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20= =20=20=20=20=20=20=20return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= =20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr64_T0(rA(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20= rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_store_T0_gpr64(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= +=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A=20}=0A=20=0A=20#define=20GEN_SPEOP_COMP(name)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A@@=20-5428,8=20= +5459,8=20@@=20static=20always_inline=20void=20gen_##name=20= (DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A=20=20=20=20=20=20=20=20=20GEN_EXCP_NO_AP(ctx);=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20= =20=20=20=20=20=20=20return;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A= =20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20\=0A-=20=20=20=20gen_op_load_gpr64_T0(rA(ctx->opcode));=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T1(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20rA(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A+=20=20=20=20gen_load_gpr64(cpu_T64[1],=20rB(ctx->opcode));=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20= =20=20=20=20gen_op_store_T0_crf(crfD(ctx->opcode));=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20\=0A=20}=0A@@=20-5465,10=20+5496,10=20@@=20= GEN_SPEOP_ARITH1(evcntlsw);=0A=20static=20always_inline=20void=20= gen_brinc=20(DisasContext=20*ctx)=0A=20{=0A=20=20=20=20=20/*=20Note:=20= brinc=20is=20usable=20even=20if=20SPE=20is=20disabled=20*/=0A-=20=20=20=20= gen_op_load_gpr_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr_T1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[0],=20cpu_gpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_tl(cpu_T[1],=20cpu_gpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_op_brinc();=0A-=20=20=20=20gen_op_store_T0_gpr(rD(ctx->opcode));=0A+=20= =20=20=20tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)],=20cpu_T[0]);=0A=20}=0A=20= =0A=20#define=20GEN_SPEOP_ARITH_IMM2(name)=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A@@=20-5478,10=20+5509,10=20@@=20static=20= always_inline=20void=20gen_##name##i=20(DisasContext=20*ctx)=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_AP(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20return;=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T0(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20rB(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20gen_op_splatwi_T1_64(rA(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A-=20=20=20=20gen_op_store_T0_gpr64(rD(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20= cpu_T64[0]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A=20#define=20= GEN_SPEOP_LOGIC_IMM2(name)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20\=0A@@=20-5491,10=20+5522,10=20@@=20static=20always_inline=20= void=20gen_##name##i=20(DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_AP(ctx);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20\=0A=20=20=20=20=20=20=20=20=20return;=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20=20=20=20=20}=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T0(rA(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20rA(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20gen_op_splatwi_T1_64(rB(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A-=20=20=20=20gen_op_store_T0_gpr64(rD(ctx->opcode));=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20\=0A+=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20= cpu_T64[0]);=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20\=0A=20}=0A=20=0A=20= GEN_SPEOP_ARITH_IMM2(evaddw);=0A@@=20-5513,7=20+5544,7=20@@=20static=20= always_inline=20void=20gen_evsplati=20(DisasContext=20*ctx)=0A=20=20=20=20= =20int32_t=20imm=20=3D=20(int32_t)(rA(ctx->opcode)=20<<=2027)=20>>=2027;=0A= =20=0A=20=20=20=20=20gen_op_splatwi_T0_64(imm);=0A-=20=20=20=20= gen_op_store_T0_gpr64(rD(ctx->opcode));=0A+=20=20=20=20= gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=0A=20}=0A=20=0A=20static=20= always_inline=20void=20gen_evsplatfi=20(DisasContext=20*ctx)=0A@@=20= -5521,7=20+5552,7=20@@=20static=20always_inline=20void=20gen_evsplatfi=20= (DisasContext=20*ctx)=0A=20=20=20=20=20uint32_t=20imm=20=3D=20= rA(ctx->opcode)=20<<=2027;=0A=20=0A=20=20=20=20=20= gen_op_splatwi_T0_64(imm);=0A-=20=20=20=20= gen_op_store_T0_gpr64(rD(ctx->opcode));=0A+=20=20=20=20= gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=0A=20}=0A=20=0A=20/*=20= Comparison=20*/=0A@@=20-5564,10=20+5595,10=20@@=20static=20always_inline=20= void=20gen_evsel=20(DisasContext=20*ctx)=0A=20=20=20=20=20=20=20=20=20= return;=0A=20=20=20=20=20}=0A=20=20=20=20=20= gen_op_load_crf_T0(ctx->opcode=20&=200x7);=0A-=20=20=20=20= gen_op_load_gpr64_T0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_gpr64_T1(rB(ctx->opcode));=0A+=20=20=20=20= gen_load_gpr64(cpu_T64[0],=20rA(ctx->opcode));=0A+=20=20=20=20= gen_load_gpr64(cpu_T64[1],=20rB(ctx->opcode));=0A=20=20=20=20=20= gen_op_evsel();=0A-=20=20=20=20gen_op_store_T0_gpr64(rD(ctx->opcode));=0A= +=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=0A=20}=0A=20= =0A=20GEN_HANDLER2(evsel0,=20"evsel",=200x04,=200x1c,=200x09,=20= 0x00000000,=20PPC_SPE)=0A@@=20-5906,9=20+5937,9=20@@=20GEN_SPE(speundef,=20= =20=20=20=20=20=20evmwsmfan,=20=20=20=20=200x0D,=200x17,=200x00000000,=20= PPC_SPE);=0A=20#define=20GEN_SPEFPUOP_CONV(name)=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20\=0A=20static=20always_inline=20= void=20gen_##name=20(DisasContext=20*ctx)=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20\=0A=20{=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20=20=20= gen_op_load_gpr64_T0(rB(ctx->opcode));=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_load_gpr64(cpu_T64[0],=20rB(ctx->opcode));=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20=20=20=20=20gen_op_##name();=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20\=0A-=20=20= =20=20gen_op_store_T0_gpr64(rD(ctx->opcode));=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= \=0A+=20=20=20=20gen_store_gpr64(rD(ctx->opcode),=20cpu_T64[0]);=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20\=0A=20}=0A=20=0A=20/*=20Single=20precision=20floating-point=20= vectors=20operations=20*/=0A--=20=0A1.5.5.1=0A=0A= --Apple-Mail-10--500572155 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-10--500572155--