Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbFVm-0002rd-AF for qemu-devel@nongnu.org; Thu, 04 Sep 2008 10:08:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbFVl-0002qq-3M for qemu-devel@nongnu.org; Thu, 04 Sep 2008 10:08:37 -0400 Received: from [199.232.76.173] (port=60840 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbFVk-0002qf-TH for qemu-devel@nongnu.org; Thu, 04 Sep 2008 10:08:36 -0400 Received: from ey-out-1920.google.com ([74.125.78.147]:57257) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbFVk-00023t-2T for qemu-devel@nongnu.org; Thu, 04 Sep 2008 10:08:37 -0400 Received: by ey-out-1920.google.com with SMTP id 4so1338774eyk.4 for ; Thu, 04 Sep 2008 07:08:34 -0700 (PDT) Message-Id: <519F0BAB-FCDE-40D4-9255-48CB569909E5@googlemail.com> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <3D7FC18B-1027-4AB9-ACDE-E7B650F259F2@googlemail.com> Content-Type: multipart/mixed; boundary=Apple-Mail-10--435566264 Mime-Version: 1.0 (Apple Message framework v926) Subject: [Qemu-devel] [PATCH 7/x] ppc: Convert FPR moves to TCG Date: Thu, 4 Sep 2008 16:08:05 +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> <3D7FC18B-1027-4AB9-ACDE-E7B650F259F2@googlemail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?ISO-8859-1?Q?Aur=E9lien_Jarno?= --Apple-Mail-10--435566264 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Replace op_{load,store}_fpr with tcg_gen_mov_i64. Introduce i64 TCG variables cpu_fpr[0..31] and cpu_FT[0..2]. This obsoletes op_template.h for REG > 7. Signed-off-by: Andreas Faerber --- target-ppc/op.c | 72 -------------------------- target-ppc/op_template.h | 50 ------------------ target-ppc/translate.c | 125 +++++++++++++++++++++++ +---------------------- 3 files changed, 65 insertions(+), 182 deletions(-) diff --git a/target-ppc/op.c b/target-ppc/op.c index e663e60..107817c 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -50,78 +50,6 @@ #define REG 7 #include "op_template.h" -#define REG 8 -#include "op_template.h" - -#define REG 9 -#include "op_template.h" - -#define REG 10 -#include "op_template.h" - -#define REG 11 -#include "op_template.h" - -#define REG 12 -#include "op_template.h" - -#define REG 13 -#include "op_template.h" - -#define REG 14 -#include "op_template.h" - -#define REG 15 -#include "op_template.h" - -#define REG 16 -#include "op_template.h" - -#define REG 17 -#include "op_template.h" - -#define REG 18 -#include "op_template.h" - -#define REG 19 -#include "op_template.h" - -#define REG 20 -#include "op_template.h" - -#define REG 21 -#include "op_template.h" - -#define REG 22 -#include "op_template.h" - -#define REG 23 -#include "op_template.h" - -#define REG 24 -#include "op_template.h" - -#define REG 25 -#include "op_template.h" - -#define REG 26 -#include "op_template.h" - -#define REG 27 -#include "op_template.h" - -#define REG 28 -#include "op_template.h" - -#define REG 29 -#include "op_template.h" - -#define REG 30 -#include "op_template.h" - -#define REG 31 -#include "op_template.h" - void OPPROTO op_print_mem_EA (void) { do_print_mem_EA(T0); diff --git a/target-ppc/op_template.h b/target-ppc/op_template.h index 64e38a9..0501256 100644 --- a/target-ppc/op_template.h +++ b/target-ppc/op_template.h @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if REG <= 7 /* Condition register moves */ void OPPROTO glue(op_load_crf_T0_crf, REG) (void) { @@ -38,53 +37,4 @@ void OPPROTO glue(op_store_T0_crf_crf, REG) (void) RETURN(); } -#if 0 // Unused -void OPPROTO glue(op_store_T1_crf_crf, REG) (void) -{ - env->crf[REG] = T1; - RETURN(); -} -#endif - -#endif /* REG <= 7 */ - -/* floating point registers moves */ -void OPPROTO glue(op_load_fpr_FT0_fpr, REG) (void) -{ - FT0 = env->fpr[REG]; - RETURN(); -} - -void OPPROTO glue(op_store_FT0_fpr_fpr, REG) (void) -{ - env->fpr[REG] = FT0; - RETURN(); -} - -void OPPROTO glue(op_load_fpr_FT1_fpr, REG) (void) -{ - FT1 = env->fpr[REG]; - RETURN(); -} - -void OPPROTO glue(op_store_FT1_fpr_fpr, REG) (void) -{ - env->fpr[REG] = FT1; - RETURN(); -} - -void OPPROTO glue(op_load_fpr_FT2_fpr, REG) (void) -{ - FT2 = env->fpr[REG]; - RETURN(); -} - -#if 0 // unused -void OPPROTO glue(op_store_FT2_fpr_fpr, REG) (void) -{ - env->fpr[REG] = FT2; - RETURN(); -} -#endif - #undef REG diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0674376..dcb64b4 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -50,11 +50,13 @@ static char cpu_reg_names[10*3 + 22*4 /* GPR */ #if !defined(TARGET_PPC64) + 10*4 + 22*5 /* SPE GPRh */ #endif + + 10*4 + 22*5 /* FPR */ + 2*(10*6 + 22*7) /* AVRh, AVRl */]; static TCGv cpu_gpr[32]; #if !defined(TARGET_PPC64) static TCGv cpu_gprh[32]; #endif +static TCGv cpu_fpr[32]; static TCGv cpu_avrh[32], cpu_avrl[32]; /* dyngen register indexes */ @@ -64,6 +66,7 @@ static TCGv cpu_T[3]; #else static TCGv cpu_T64[3]; #endif +static TCGv cpu_FT[3]; static TCGv cpu_AVRh[3], cpu_AVRl[3]; #include "gen-icount.h" @@ -101,6 +104,14 @@ void ppc_translate_init(void) TCG_AREG0, offsetof(CPUState, t2_64), "T2_64"); #endif + + cpu_FT[0] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, + offsetof(CPUState, ft0), "FT0"); + cpu_FT[1] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, + offsetof(CPUState, ft1), "FT1"); + cpu_FT[2] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, + offsetof(CPUState, ft2), "FT2"); + cpu_AVRh[0] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, offsetof(CPUState, avr0.u64[0]), "AVR0H"); cpu_AVRl[0] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, @@ -127,6 +138,10 @@ void ppc_translate_init(void) p += (i < 10) ? 4 : 5; #endif + sprintf(p, "fp%d", i); + cpu_fpr[i] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, + offsetof(CPUState, fpr[i]), p); + sprintf(p, "avr%dH", i); cpu_avrh[i] = tcg_global_mem_new(TCG_TYPE_I64, TCG_AREG0, offsetof(CPUState, avr[i].u64[0]), p); @@ -196,16 +211,6 @@ GEN8(gen_op_store_T0_crf, gen_op_store_T0_crf_crf); GEN8(gen_op_store_T1_crf, gen_op_store_T1_crf_crf); #endif -/* floating point registers moves */ -GEN32(gen_op_load_fpr_FT0, gen_op_load_fpr_FT0_fpr); -GEN32(gen_op_load_fpr_FT1, gen_op_load_fpr_FT1_fpr); -GEN32(gen_op_load_fpr_FT2, gen_op_load_fpr_FT2_fpr); -GEN32(gen_op_store_FT0_fpr, gen_op_store_FT0_fpr_fpr); -GEN32(gen_op_store_FT1_fpr, gen_op_store_FT1_fpr_fpr); -#if 0 // unused -GEN32(gen_op_store_FT2_fpr, gen_op_store_FT2_fpr_fpr); -#endif - /* internal defines */ typedef struct DisasContext { struct TranslationBlock *tb; @@ -1780,15 +1785,15 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, 0x00000000, type) \ GEN_EXCP_NO_FP(ctx); \ return; \ } \ - gen_op_load_fpr_FT0(rA(ctx- >opcode)); \ - gen_op_load_fpr_FT1(rC(ctx- >opcode)); \ - gen_op_load_fpr_FT2(rB(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx- >opcode)]); \ + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rC(ctx- >opcode)]); \ + tcg_gen_mov_i64(cpu_FT[2], cpu_fpr[rB(ctx- >opcode)]); \ gen_reset_fpstatus (); \ gen_op_f ##op(); \ if (isfloat) { \ gen_op_frsp(); \ } \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ } @@ -1803,14 +1808,14 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type) \ GEN_EXCP_NO_FP(ctx); \ return; \ } \ - gen_op_load_fpr_FT0(rA(ctx- >opcode)); \ - gen_op_load_fpr_FT1(rB(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx- >opcode)]); \ + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx- >opcode)]); \ gen_reset_fpstatus (); \ gen_op_f ##op(); \ if (isfloat) { \ gen_op_frsp(); \ } \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ } #define GEN_FLOAT_AB(name, op2, inval, set_fprf, type) \ @@ -1824,14 +1829,14 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type) \ GEN_EXCP_NO_FP(ctx); \ return; \ } \ - gen_op_load_fpr_FT0(rA(ctx- >opcode)); \ - gen_op_load_fpr_FT1(rC(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx- >opcode)]); \ + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rC(ctx- >opcode)]); \ gen_reset_fpstatus (); \ gen_op_f ##op(); \ if (isfloat) { \ gen_op_frsp(); \ } \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ } #define GEN_FLOAT_AC(name, op2, inval, set_fprf, type) \ @@ -1845,10 +1850,10 @@ GEN_HANDLER(f##name, 0x3F, op2, op3, 0x001F0000, type) \ GEN_EXCP_NO_FP(ctx); \ return; \ } \ - gen_op_load_fpr_FT0(rB(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx- >opcode)]); \ gen_reset_fpstatus (); \ gen_op_f ##name(); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ } @@ -1859,10 +1864,10 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, 0x001F07C0, type) \ GEN_EXCP_NO_FP(ctx); \ return; \ } \ - gen_op_load_fpr_FT0(rB(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx- >opcode)]); \ gen_reset_fpstatus (); \ gen_op_f ##name(); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ } @@ -1902,10 +1907,10 @@ GEN_HANDLER(fsqrt, 0x3F, 0x16, 0xFF, 0x001F07C0, PPC_FLOAT_FSQRT) GEN_EXCP_NO_FP(ctx); return; } - gen_op_load_fpr_FT0(rB(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); gen_reset_fpstatus(); gen_op_fsqrt(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); gen_compute_fprf(1, Rc(ctx->opcode) != 0); } @@ -1915,11 +1920,11 @@ GEN_HANDLER(fsqrts, 0x3B, 0x16, 0xFF, 0x001F07C0, PPC_FLOAT_FSQRT) GEN_EXCP_NO_FP(ctx); return; } - gen_op_load_fpr_FT0(rB(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); gen_reset_fpstatus(); gen_op_fsqrt(); gen_op_frsp(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); gen_compute_fprf(1, Rc(ctx->opcode) != 0); } @@ -1966,8 +1971,8 @@ GEN_HANDLER(fcmpo, 0x3F, 0x00, 0x01, 0x00600001, PPC_FLOAT) GEN_EXCP_NO_FP(ctx); return; } - gen_op_load_fpr_FT0(rA(ctx->opcode)); - gen_op_load_fpr_FT1(rB(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx->opcode)]); gen_reset_fpstatus(); gen_op_fcmpo(); gen_op_store_T0_crf(crfD(ctx->opcode)); @@ -1981,8 +1986,8 @@ GEN_HANDLER(fcmpu, 0x3F, 0x00, 0x00, 0x00600001, PPC_FLOAT) GEN_EXCP_NO_FP(ctx); return; } - gen_op_load_fpr_FT0(rA(ctx->opcode)); - gen_op_load_fpr_FT1(rB(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx->opcode)]); gen_reset_fpstatus(); gen_op_fcmpu(); gen_op_store_T0_crf(crfD(ctx->opcode)); @@ -2002,8 +2007,8 @@ GEN_HANDLER(fmr, 0x3F, 0x08, 0x02, 0x001F0000, PPC_FLOAT) GEN_EXCP_NO_FP(ctx); return; } - gen_op_load_fpr_FT0(rB(ctx->opcode)); - gen_op_store_FT0_fpr(rD(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); gen_compute_fprf(0, Rc(ctx->opcode) != 0); } @@ -2041,7 +2046,7 @@ GEN_HANDLER(mffs, 0x3F, 0x07, 0x12, 0x001FF800, PPC_FLOAT) gen_optimize_fprf(); gen_reset_fpstatus(); gen_op_load_fpscr_FT0(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); gen_compute_fprf(0, Rc(ctx->opcode) != 0); } @@ -2096,7 +2101,7 @@ GEN_HANDLER(mtfsf, 0x3F, 0x07, 0x16, 0x02010000, PPC_FLOAT) return; } gen_optimize_fprf(); - gen_op_load_fpr_FT0(rB(ctx->opcode)); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); gen_reset_fpstatus(); gen_op_store_fpscr(FM(ctx->opcode)); if (unlikely(Rc(ctx->opcode) != 0)) { @@ -2716,7 +2721,7 @@ GEN_HANDLER(l##width, opc, 0xFF, 0xFF, 0x00000000, type) \ } \ gen_addr_imm_index(ctx, 0); \ op_ldst (l##width); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ } #define GEN_LDUF(width, opc, type) \ @@ -2732,7 +2737,7 @@ GEN_HANDLER(l##width##u, opc, 0xFF, 0xFF, 0x00000000, type) \ } \ gen_addr_imm_index(ctx, 0); \ op_ldst (l##width); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \ } @@ -2749,7 +2754,7 @@ GEN_HANDLER(l##width##ux, 0x1F, 0x17, opc, 0x00000001, type) \ } \ gen_addr_reg_index (ctx); \ op_ldst (l##width); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \ } @@ -2762,7 +2767,7 @@ GEN_HANDLER(l##width##x, 0x1F, opc2, opc3, 0x00000001, type) \ } \ gen_addr_reg_index (ctx); \ op_ldst (l##width); \ - gen_op_store_FT0_fpr(rD(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ } #define GEN_LDFS(width, op, type) \ @@ -2786,7 +2791,7 @@ GEN_HANDLER(st##width, opc, 0xFF, 0xFF, 0x00000000, type) \ return; \ } \ gen_addr_imm_index(ctx, 0); \ - gen_op_load_fpr_FT0(rS(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx- >opcode)]); \ op_ldst (st##width); \ } @@ -2802,7 +2807,7 @@ GEN_HANDLER(st##width##u, opc, 0xFF, 0xFF, 0x00000000, type) \ return; \ } \ gen_addr_imm_index(ctx, 0); \ - gen_op_load_fpr_FT0(rS(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx- >opcode)]); \ op_ldst (st##width); \ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \ } @@ -2819,7 +2824,7 @@ GEN_HANDLER(st##width##ux, 0x1F, 0x17, opc, 0x00000001, type) \ return; \ } \ gen_addr_reg_index (ctx); \ - gen_op_load_fpr_FT0(rS(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx- >opcode)]); \ op_ldst (st##width); \ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \ } @@ -2832,7 +2837,7 @@ GEN_HANDLER(st##width##x, 0x1F, opc2, opc3, 0x00000001, type) \ return; \ } \ gen_addr_reg_index (ctx); \ - gen_op_load_fpr_FT0(rS(ctx- >opcode)); \ + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx- >opcode)]); \ op_ldst (st##width); \ } @@ -4522,8 +4527,8 @@ GEN_HANDLER(lfq, 0x38, 0xFF, 0xFF, 0x00000003, PPC_POWER2) gen_update_nip(ctx, ctx->nip - 4); gen_addr_imm_index(ctx, 0); op_POWER2_lfq(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); - gen_op_store_FT1_fpr(rD(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode) + 1], cpu_FT[1]); } /* lfqu */ @@ -4535,8 +4540,8 @@ GEN_HANDLER(lfqu, 0x39, 0xFF, 0xFF, 0x00000003, PPC_POWER2) gen_update_nip(ctx, ctx->nip - 4); gen_addr_imm_index(ctx, 0); op_POWER2_lfq(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); - gen_op_store_FT1_fpr(rD(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode) + 1], cpu_FT[1]); if (ra != 0) tcg_gen_mov_tl(cpu_gpr[ra], cpu_T[0]); } @@ -4550,8 +4555,8 @@ GEN_HANDLER(lfqux, 0x1F, 0x17, 0x19, 0x00000001, PPC_POWER2) gen_update_nip(ctx, ctx->nip - 4); gen_addr_reg_index(ctx); op_POWER2_lfq(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); - gen_op_store_FT1_fpr(rD(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode) + 1], cpu_FT[1]); if (ra != 0) tcg_gen_mov_tl(cpu_gpr[ra], cpu_T[0]); } @@ -4563,8 +4568,8 @@ GEN_HANDLER(lfqx, 0x1F, 0x17, 0x18, 0x00000001, PPC_POWER2) gen_update_nip(ctx, ctx->nip - 4); gen_addr_reg_index(ctx); op_POWER2_lfq(); - gen_op_store_FT0_fpr(rD(ctx->opcode)); - gen_op_store_FT1_fpr(rD(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); + tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode) + 1], cpu_FT[1]); } /* stfq */ @@ -4573,8 +4578,8 @@ GEN_HANDLER(stfq, 0x3C, 0xFF, 0xFF, 0x00000003, PPC_POWER2) /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_addr_imm_index(ctx, 0); - gen_op_load_fpr_FT0(rS(ctx->opcode)); - gen_op_load_fpr_FT1(rS(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rS(ctx->opcode) + 1]); op_POWER2_stfq(); } @@ -4586,8 +4591,8 @@ GEN_HANDLER(stfqu, 0x3D, 0xFF, 0xFF, 0x00000003, PPC_POWER2) /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_addr_imm_index(ctx, 0); - gen_op_load_fpr_FT0(rS(ctx->opcode)); - gen_op_load_fpr_FT1(rS(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rS(ctx->opcode) + 1]); op_POWER2_stfq(); if (ra != 0) tcg_gen_mov_tl(cpu_gpr[ra], cpu_T[0]); @@ -4601,8 +4606,8 @@ GEN_HANDLER(stfqux, 0x1F, 0x17, 0x1D, 0x00000001, PPC_POWER2) /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_addr_reg_index(ctx); - gen_op_load_fpr_FT0(rS(ctx->opcode)); - gen_op_load_fpr_FT1(rS(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rS(ctx->opcode) + 1]); op_POWER2_stfq(); if (ra != 0) tcg_gen_mov_tl(cpu_gpr[ra], cpu_T[0]); @@ -4614,8 +4619,8 @@ GEN_HANDLER(stfqx, 0x1F, 0x17, 0x1C, 0x00000001, PPC_POWER2) /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_addr_reg_index(ctx); - gen_op_load_fpr_FT0(rS(ctx->opcode)); - gen_op_load_fpr_FT1(rS(ctx->opcode) + 1); + tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rS(ctx->opcode)]); + tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rS(ctx->opcode) + 1]); op_POWER2_stfq(); } -- 1.5.5.1 --Apple-Mail-10--435566264 Content-Disposition: attachment; filename=FPR-moves.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="FPR-moves.patch" Content-Transfer-Encoding: quoted-printable =46rom=205c752cde4dd9baac199a79ce70829e40747b11c4=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?utf-8?q?Andreas=3D20F=3DC3=3DA4rber?=3D=20= =0ADate:=20Thu,=204=20Sep=202008=2015:38:12=20= +0200=0ASubject:=20[PATCH]=20ppc:=20Convert=20FPR=20moves=20to=20TCG=0A=0A= ---=0A=20target-ppc/op.c=20=20=20=20=20=20=20=20=20=20|=20=20=2072=20= --------------------------=0A=20target-ppc/op_template.h=20|=20=20=2050=20= ------------------=0A=20target-ppc/translate.c=20=20=20|=20=20125=20= ++++++++++++++++++++++++----------------------=0A=203=20files=20changed,=20= 65=20insertions(+),=20182=20deletions(-)=0A=0Adiff=20--git=20= a/target-ppc/op.c=20b/target-ppc/op.c=0Aindex=20e663e60..107817c=20= 100644=0A---=20a/target-ppc/op.c=0A+++=20b/target-ppc/op.c=0A@@=20-50,78=20= +50,6=20@@=0A=20#define=20REG=207=0A=20#include=20"op_template.h"=0A=20=0A= -#define=20REG=208=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=20= 9=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=2010=0A-#include=20= "op_template.h"=0A-=0A-#define=20REG=2011=0A-#include=20"op_template.h"=0A= -=0A-#define=20REG=2012=0A-#include=20"op_template.h"=0A-=0A-#define=20= REG=2013=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=2014=0A= -#include=20"op_template.h"=0A-=0A-#define=20REG=2015=0A-#include=20= "op_template.h"=0A-=0A-#define=20REG=2016=0A-#include=20"op_template.h"=0A= -=0A-#define=20REG=2017=0A-#include=20"op_template.h"=0A-=0A-#define=20= REG=2018=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=2019=0A= -#include=20"op_template.h"=0A-=0A-#define=20REG=2020=0A-#include=20= "op_template.h"=0A-=0A-#define=20REG=2021=0A-#include=20"op_template.h"=0A= -=0A-#define=20REG=2022=0A-#include=20"op_template.h"=0A-=0A-#define=20= REG=2023=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=2024=0A= -#include=20"op_template.h"=0A-=0A-#define=20REG=2025=0A-#include=20= "op_template.h"=0A-=0A-#define=20REG=2026=0A-#include=20"op_template.h"=0A= -=0A-#define=20REG=2027=0A-#include=20"op_template.h"=0A-=0A-#define=20= REG=2028=0A-#include=20"op_template.h"=0A-=0A-#define=20REG=2029=0A= -#include=20"op_template.h"=0A-=0A-#define=20REG=2030=0A-#include=20= "op_template.h"=0A-=0A-#define=20REG=2031=0A-#include=20"op_template.h"=0A= -=0A=20void=20OPPROTO=20op_print_mem_EA=20(void)=0A=20{=0A=20=20=20=20=20= do_print_mem_EA(T0);=0Adiff=20--git=20a/target-ppc/op_template.h=20= b/target-ppc/op_template.h=0Aindex=2064e38a9..0501256=20100644=0A---=20= a/target-ppc/op_template.h=0A+++=20b/target-ppc/op_template.h=0A@@=20= -18,7=20+18,6=20@@=0A=20=20*=20Foundation,=20Inc.,=2059=20Temple=20= Place,=20Suite=20330,=20Boston,=20MA=20=2002111-1307=20=20USA=0A=20=20*/=0A= =20=0A-#if=20REG=20<=3D=207=0A=20/*=20Condition=20register=20moves=20*/=0A= =20void=20OPPROTO=20glue(op_load_crf_T0_crf,=20REG)=20(void)=0A=20{=0A@@=20= -38,53=20+37,4=20@@=20void=20OPPROTO=20glue(op_store_T0_crf_crf,=20REG)=20= (void)=0A=20=20=20=20=20RETURN();=0A=20}=0A=20=0A-#if=200=20//=20Unused=0A= -void=20OPPROTO=20glue(op_store_T1_crf_crf,=20REG)=20(void)=0A-{=0A-=20=20= =20=20env->crf[REG]=20=3D=20T1;=0A-=20=20=20=20RETURN();=0A-}=0A-#endif=0A= -=0A-#endif=20/*=20REG=20<=3D=207=20*/=0A-=0A-/*=20floating=20point=20= registers=20moves=20*/=0A-void=20OPPROTO=20glue(op_load_fpr_FT0_fpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20FT0=20=3D=20env->fpr[REG];=0A-=20=20=20= =20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_store_FT0_fpr_fpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20env->fpr[REG]=20=3D=20FT0;=0A-=20=20=20= =20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_load_fpr_FT1_fpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20FT1=20=3D=20env->fpr[REG];=0A-=20=20=20= =20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_store_FT1_fpr_fpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20env->fpr[REG]=20=3D=20FT1;=0A-=20=20=20= =20RETURN();=0A-}=0A-=0A-void=20OPPROTO=20glue(op_load_fpr_FT2_fpr,=20= REG)=20(void)=0A-{=0A-=20=20=20=20FT2=20=3D=20env->fpr[REG];=0A-=20=20=20= =20RETURN();=0A-}=0A-=0A-#if=200=20//=20unused=0A-void=20OPPROTO=20= glue(op_store_FT2_fpr_fpr,=20REG)=20(void)=0A-{=0A-=20=20=20=20= env->fpr[REG]=20=3D=20FT2;=0A-=20=20=20=20RETURN();=0A-}=0A-#endif=0A-=0A= =20#undef=20REG=0Adiff=20--git=20a/target-ppc/translate.c=20= b/target-ppc/translate.c=0Aindex=200674376..dcb64b4=20100644=0A---=20= a/target-ppc/translate.c=0A+++=20b/target-ppc/translate.c=0A@@=20-50,11=20= +50,13=20@@=20static=20char=20cpu_reg_names[10*3=20+=2022*4=20/*=20GPR=20= */=0A=20#if=20!defined(TARGET_PPC64)=0A=20=20=20=20=20+=2010*4=20+=20= 22*5=20/*=20SPE=20GPRh=20*/=0A=20#endif=0A+=20=20=20=20+=2010*4=20+=20= 22*5=20/*=20FPR=20*/=0A=20=20=20=20=20+=202*(10*6=20+=2022*7)=20/*=20= AVRh,=20AVRl=20*/];=0A=20static=20TCGv=20cpu_gpr[32];=0A=20#if=20= !defined(TARGET_PPC64)=0A=20static=20TCGv=20cpu_gprh[32];=0A=20#endif=0A= +static=20TCGv=20cpu_fpr[32];=0A=20static=20TCGv=20cpu_avrh[32],=20= cpu_avrl[32];=0A=20=0A=20/*=20dyngen=20register=20indexes=20*/=0A@@=20= -64,6=20+66,7=20@@=20static=20TCGv=20cpu_T[3];=0A=20#else=0A=20static=20= TCGv=20cpu_T64[3];=0A=20#endif=0A+static=20TCGv=20cpu_FT[3];=0A=20static=20= TCGv=20cpu_AVRh[3],=20cpu_AVRl[3];=0A=20=0A=20#include=20"gen-icount.h"=0A= @@=20-101,6=20+104,14=20@@=20void=20ppc_translate_init(void)=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=20TCG_AREG0,=20offsetof(CPUState,=20t2_64),=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"T2_64");=0A=20#endif=0A+=20=20=20=20=0A+=20= =20=20=20cpu_FT[0]=20=3D=20tcg_global_mem_new(TCG_TYPE_I64,=20TCG_AREG0,=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=20offsetof(CPUState,=20ft0),=20"FT0");=0A= +=20=20=20=20cpu_FT[1]=20=3D=20tcg_global_mem_new(TCG_TYPE_I64,=20= TCG_AREG0,=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=20offsetof(CPUState,=20ft1),=20= "FT1");=0A+=20=20=20=20cpu_FT[2]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I64,=20TCG_AREG0,=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=20offsetof(CPUState,=20ft2),=20"FT2");=0A+=20=20=20=20=0A=20=20=20=20= =20cpu_AVRh[0]=20=3D=20tcg_global_mem_new(TCG_TYPE_I64,=20TCG_AREG0,=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=20offsetof(CPUState,=20avr0.u64[0]),=20= "AVR0H");=0A=20=20=20=20=20cpu_AVRl[0]=20=3D=20= tcg_global_mem_new(TCG_TYPE_I64,=20TCG_AREG0,=0A@@=20-127,6=20+138,10=20= @@=20void=20ppc_translate_init(void)=0A=20=20=20=20=20=20=20=20=20p=20+=3D= =20(i=20<=2010)=20?=204=20:=205;=0A=20#endif=0A=20=20=20=20=20=20=20=20=20= =0A+=20=20=20=20=20=20=20=20sprintf(p,=20"fp%d",=20i);=0A+=20=20=20=20=20= =20=20=20cpu_fpr[i]=20=3D=20tcg_global_mem_new(TCG_TYPE_I64,=20= TCG_AREG0,=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= offsetof(CPUState,=20fpr[i]),=20p);=0A+=20=20=20=20=20=20=20=20=0A=20=20=20= =20=20=20=20=20=20sprintf(p,=20"avr%dH",=20i);=0A=20=20=20=20=20=20=20=20= =20cpu_avrh[i]=20=3D=20tcg_global_mem_new(TCG_TYPE_I64,=20TCG_AREG0,=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=20offsetof(CPUState,=20= avr[i].u64[0]),=20p);=0A@@=20-196,16=20+211,6=20@@=20= GEN8(gen_op_store_T0_crf,=20gen_op_store_T0_crf_crf);=0A=20= GEN8(gen_op_store_T1_crf,=20gen_op_store_T1_crf_crf);=0A=20#endif=0A=20=0A= -/*=20floating=20point=20registers=20moves=20*/=0A= -GEN32(gen_op_load_fpr_FT0,=20gen_op_load_fpr_FT0_fpr);=0A= -GEN32(gen_op_load_fpr_FT1,=20gen_op_load_fpr_FT1_fpr);=0A= -GEN32(gen_op_load_fpr_FT2,=20gen_op_load_fpr_FT2_fpr);=0A= -GEN32(gen_op_store_FT0_fpr,=20gen_op_store_FT0_fpr_fpr);=0A= -GEN32(gen_op_store_FT1_fpr,=20gen_op_store_FT1_fpr_fpr);=0A-#if=200=20= //=20unused=0A-GEN32(gen_op_store_FT2_fpr,=20gen_op_store_FT2_fpr_fpr);=0A= -#endif=0A-=0A=20/*=20internal=20defines=20*/=0A=20typedef=20struct=20= DisasContext=20{=0A=20=20=20=20=20struct=20TranslationBlock=20*tb;=0A@@=20= -1780,15=20+1785,15=20@@=20GEN_HANDLER(f##name,=20op1,=20op2,=200xFF,=20= 0x00000000,=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=20=20=20=20=20=20=20=20=20GEN_EXCP_NO_FP(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_fpr_FT0(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= gen_op_load_fpr_FT1(rC(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=20gen_op_load_fpr_FT2(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\=0A+=20=20=20=20tcg_gen_mov_i64(cpu_FT[0],=20= cpu_fpr[rA(ctx->opcode)]);=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_i64(cpu_FT[1],=20= cpu_fpr[rC(ctx->opcode)]);=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_i64(cpu_FT[2],=20= cpu_fpr[rB(ctx->opcode)]);=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_reset_fpstatus();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =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_f##op();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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= if=20(isfloat)=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_frsp();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_compute_fprf(set_fprf,=20Rc(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\=0A=20}=0A= =20=0A@@=20-1803,14=20+1808,14=20@@=20GEN_HANDLER(f##name,=20op1,=20op2,=20= 0xFF,=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\=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(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_fpr_FT0(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=20gen_op_load_fpr_FT1(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\=0A+=20=20=20=20tcg_gen_mov_i64(cpu_FT[0],=20= cpu_fpr[rA(ctx->opcode)]);=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_i64(cpu_FT[1],=20= cpu_fpr[rB(ctx->opcode)]);=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_reset_fpstatus();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =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_f##op();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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= if=20(isfloat)=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_frsp();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_compute_fprf(set_fprf,=20Rc(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\=0A=20}=0A= =20#define=20GEN_FLOAT_AB(name,=20op2,=20inval,=20set_fprf,=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@@=20= -1824,14=20+1829,14=20@@=20GEN_HANDLER(f##name,=20op1,=20op2,=200xFF,=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\=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(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_fpr_FT0(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=20gen_op_load_fpr_FT1(rC(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_i64(cpu_FT[0],=20= cpu_fpr[rA(ctx->opcode)]);=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_i64(cpu_FT[1],=20= cpu_fpr[rC(ctx->opcode)]);=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_reset_fpstatus();=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =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_f##op();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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= if=20(isfloat)=20{=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_frsp();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_compute_fprf(set_fprf,=20Rc(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\=0A=20}=0A= =20#define=20GEN_FLOAT_AC(name,=20op2,=20inval,=20set_fprf,=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@@=20= -1845,10=20+1850,10=20@@=20GEN_HANDLER(f##name,=200x3F,=20op2,=20op3,=20= 0x001F0000,=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=20=20=20=20=20=20=20=20=20GEN_EXCP_NO_FP(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_fpr_FT0(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\=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=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_reset_fpstatus();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=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_f##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\=0A-=20=20=20=20gen_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=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_compute_fprf(set_fprf,=20Rc(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\=0A=20}=0A=20=0A= @@=20-1859,10=20+1864,10=20@@=20GEN_HANDLER(f##name,=20op1,=20op2,=20= 0xFF,=200x001F07C0,=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=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(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_fpr_FT0(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= \=0A+=20=20=20=20tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=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_reset_fpstatus();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=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_f##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\=0A-=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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_compute_fprf(set_fprf,=20Rc(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\=0A=20}=0A= =20=0A@@=20-1902,10=20+1907,10=20@@=20GEN_HANDLER(fsqrt,=200x3F,=200x16,=20= 0xFF,=200x001F07C0,=20PPC_FLOAT_FSQRT)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20= }=0A-=20=20=20=20gen_op_load_fpr_FT0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_reset_fpstatus();=0A=20=20=20=20=20gen_op_fsqrt();=0A-=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A=20=20=20=20=20= gen_compute_fprf(1,=20Rc(ctx->opcode)=20!=3D=200);=0A=20}=0A=20=0A@@=20= -1915,11=20+1920,11=20@@=20GEN_HANDLER(fsqrts,=200x3B,=200x16,=200xFF,=20= 0x001F07C0,=20PPC_FLOAT_FSQRT)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20= }=0A-=20=20=20=20gen_op_load_fpr_FT0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_reset_fpstatus();=0A=20=20=20=20=20gen_op_fsqrt();=0A=20=20=20=20=20= gen_op_frsp();=0A-=20=20=20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A+=20= =20=20=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A=20=20= =20=20=20gen_compute_fprf(1,=20Rc(ctx->opcode)=20!=3D=200);=0A=20}=0A=20=0A= @@=20-1966,8=20+1971,8=20@@=20GEN_HANDLER(fcmpo,=200x3F,=200x00,=200x01,=20= 0x00600001,=20PPC_FLOAT)=0A=20=20=20=20=20=20=20=20=20= GEN_EXCP_NO_FP(ctx);=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20=20=20= }=0A-=20=20=20=20gen_op_load_fpr_FT0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_reset_fpstatus();=0A=20=20=20=20=20gen_op_fcmpo();=0A=20=20=20=20=20= gen_op_store_T0_crf(crfD(ctx->opcode));=0A@@=20-1981,8=20+1986,8=20@@=20= GEN_HANDLER(fcmpu,=200x3F,=200x00,=200x00,=200x00600001,=20PPC_FLOAT)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_NO_FP(ctx);=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_fpr_FT0(rA(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rA(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_reset_fpstatus();=0A=20=20=20=20=20gen_op_fcmpu();=0A=20=20=20=20=20= gen_op_store_T0_crf(crfD(ctx->opcode));=0A@@=20-2002,8=20+2007,8=20@@=20= GEN_HANDLER(fmr,=200x3F,=200x08,=200x02,=200x001F0000,=20PPC_FLOAT)=0A=20= =20=20=20=20=20=20=20=20GEN_EXCP_NO_FP(ctx);=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_fpr_FT0(rB(ctx->opcode));=0A-=20=20=20=20= gen_op_store_FT0_fpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A=20=20=20=20=20= gen_compute_fprf(0,=20Rc(ctx->opcode)=20!=3D=200);=0A=20}=0A=20=0A@@=20= -2041,7=20+2046,7=20@@=20GEN_HANDLER(mffs,=200x3F,=200x07,=200x12,=20= 0x001FF800,=20PPC_FLOAT)=0A=20=20=20=20=20gen_optimize_fprf();=0A=20=20=20= =20=20gen_reset_fpstatus();=0A=20=20=20=20=20gen_op_load_fpscr_FT0();=0A= -=20=20=20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A=20=20=20=20=20= gen_compute_fprf(0,=20Rc(ctx->opcode)=20!=3D=200);=0A=20}=0A=20=0A@@=20= -2096,7=20+2101,7=20@@=20GEN_HANDLER(mtfsf,=200x3F,=200x07,=200x16,=20= 0x02010000,=20PPC_FLOAT)=0A=20=20=20=20=20=20=20=20=20return;=0A=20=20=20= =20=20}=0A=20=20=20=20=20gen_optimize_fprf();=0A-=20=20=20=20= gen_op_load_fpr_FT0(rB(ctx->opcode));=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rB(ctx->opcode)]);=0A=20=20=20=20=20= gen_reset_fpstatus();=0A=20=20=20=20=20= gen_op_store_fpscr(FM(ctx->opcode));=0A=20=20=20=20=20if=20= (unlikely(Rc(ctx->opcode)=20!=3D=200))=20{=0A@@=20-2716,7=20+2721,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_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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_LDUF(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\=0A@@=20-2732,7=20+2737,7=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}=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =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=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_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=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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= 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}=0A=20=0A@@=20= -2749,7=20+2754,7=20@@=20GEN_HANDLER(l##width##ux,=200x1F,=200x17,=20= opc,=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=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=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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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=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-2762,7=20+2767,7=20@@=20GEN_HANDLER(l##width##x,=200x1F,=20opc2,=20= opc3,=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=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=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=20tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=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_LDFS(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\=0A@@=20-2786,7=20+2791,7=20@@=20= GEN_HANDLER(st##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\=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_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_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=20tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=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-2802,7=20= +2807,7=20@@=20GEN_HANDLER(st##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= \=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_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_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=20tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=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=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}=0A@@=20-2819,7=20= +2824,7=20@@=20GEN_HANDLER(st##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\=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_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=20tcg_gen_mov_i64(cpu_FT[0],=20= cpu_fpr[rS(ctx->opcode)]);=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=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-2832,7=20+2837,7=20@@=20GEN_HANDLER(st##width##x,=200x1F,=20opc2,=20= opc3,=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=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_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=20tcg_gen_mov_i64(cpu_FT[0],=20= cpu_fpr[rS(ctx->opcode)]);=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-4522,8=20+4527,8=20@@=20GEN_HANDLER(lfq,=200x38,=20= 0xFF,=200xFF,=200x00000003,=20PPC_POWER2)=0A=20=20=20=20=20= gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_imm_index(ctx,=200);=0A=20=20=20=20=20op_POWER2_lfq();=0A-=20=20= =20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A-=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)=20+=201],=20cpu_FT[1]);=0A=20}=0A= =20=0A=20/*=20lfqu=20*/=0A@@=20-4535,8=20+4540,8=20@@=20= GEN_HANDLER(lfqu,=200x39,=200xFF,=200xFF,=200x00000003,=20PPC_POWER2)=0A=20= =20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_imm_index(ctx,=200);=0A=20=20=20=20=20op_POWER2_lfq();=0A-=20=20= =20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A-=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)=20+=201],=20cpu_FT[1]);=0A=20=20=20= =20=20if=20(ra=20!=3D=200)=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A@@=20-4550,8=20+4555,8=20= @@=20GEN_HANDLER(lfqux,=200x1F,=200x17,=200x19,=200x00000001,=20= PPC_POWER2)=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20= =20=20=20=20gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_POWER2_lfq();=0A= -=20=20=20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A-=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)=20+=201],=20cpu_FT[1]);=0A=20=20=20= =20=20if=20(ra=20!=3D=200)=0A=20=20=20=20=20=20=20=20=20= tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A=20}=0A@@=20-4563,8=20+4568,8=20= @@=20GEN_HANDLER(lfqx,=200x1F,=200x17,=200x18,=200x00000001,=20= PPC_POWER2)=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20= =20=20=20=20gen_addr_reg_index(ctx);=0A=20=20=20=20=20op_POWER2_lfq();=0A= -=20=20=20=20gen_op_store_FT0_fpr(rD(ctx->opcode));=0A-=20=20=20=20= gen_op_store_FT1_fpr(rD(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)],=20cpu_FT[0]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)=20+=201],=20cpu_FT[1]);=0A=20}=0A= =20=0A=20/*=20stfq=20*/=0A@@=20-4573,8=20+4578,8=20@@=20= GEN_HANDLER(stfq,=200x3C,=200xFF,=200xFF,=200x00000003,=20PPC_POWER2)=0A=20= =20=20=20=20/*=20NIP=20cannot=20be=20restored=20if=20the=20memory=20= exception=20comes=20from=20an=20helper=20*/=0A=20=20=20=20=20= gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_imm_index(ctx,=200);=0A-=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rS(ctx->opcode)=20+=201]);=0A=20=20=20= =20=20op_POWER2_stfq();=0A=20}=0A=20=0A@@=20-4586,8=20+4591,8=20@@=20= GEN_HANDLER(stfqu,=200x3D,=200xFF,=200xFF,=200x00000003,=20PPC_POWER2)=0A= =20=20=20=20=20/*=20NIP=20cannot=20be=20restored=20if=20the=20memory=20= exception=20comes=20from=20an=20helper=20*/=0A=20=20=20=20=20= gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20=20= gen_addr_imm_index(ctx,=200);=0A-=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rS(ctx->opcode)=20+=201]);=0A=20=20=20= =20=20op_POWER2_stfq();=0A=20=20=20=20=20if=20(ra=20!=3D=200)=0A=20=20=20= =20=20=20=20=20=20tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A@@=20= -4601,8=20+4606,8=20@@=20GEN_HANDLER(stfqux,=200x1F,=200x17,=200x1D,=20= 0x00000001,=20PPC_POWER2)=0A=20=20=20=20=20/*=20NIP=20cannot=20be=20= restored=20if=20the=20memory=20exception=20comes=20from=20an=20helper=20= */=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20= =20gen_addr_reg_index(ctx);=0A-=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rS(ctx->opcode)=20+=201]);=0A=20=20=20= =20=20op_POWER2_stfq();=0A=20=20=20=20=20if=20(ra=20!=3D=200)=0A=20=20=20= =20=20=20=20=20=20tcg_gen_mov_tl(cpu_gpr[ra],=20cpu_T[0]);=0A@@=20= -4614,8=20+4619,8=20@@=20GEN_HANDLER(stfqx,=200x1F,=200x17,=200x1C,=20= 0x00000001,=20PPC_POWER2)=0A=20=20=20=20=20/*=20NIP=20cannot=20be=20= restored=20if=20the=20memory=20exception=20comes=20from=20an=20helper=20= */=0A=20=20=20=20=20gen_update_nip(ctx,=20ctx->nip=20-=204);=0A=20=20=20=20= =20gen_addr_reg_index(ctx);=0A-=20=20=20=20= gen_op_load_fpr_FT0(rS(ctx->opcode));=0A-=20=20=20=20= gen_op_load_fpr_FT1(rS(ctx->opcode)=20+=201);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[0],=20cpu_fpr[rS(ctx->opcode)]);=0A+=20=20=20=20= tcg_gen_mov_i64(cpu_FT[1],=20cpu_fpr[rS(ctx->opcode)=20+=201]);=0A=20=20=20= =20=20op_POWER2_stfq();=0A=20}=0A=20=0A--=20=0A1.5.5.1=0A=0A= --Apple-Mail-10--435566264--