target/ppc: Move floating-point instructions to decodetree.
cover target/ppc: Move floating-point instructions to decodetree.
Moving floating point rounding, conversion, compare and move instructions to decodetree specification.
Also proposing myself as a reviewer for PowerPC TCG CPUs.
Chinmay Rath (5):
target/ppc: Move floating-point rounding and conversion instructions
to decodetree.
target/ppc: Move floating-point compare instructions to decodetree. target/ppc: Move floating-point move instructions to decodetree. target/ppc: Move remaining floating-point move instructions to
decodetree.
MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs
MAINTAINERS | 1 + target/ppc/fpu_helper.c | 38 ++-- target/ppc/helper.h | 38 ++-- target/ppc/insn32.decode | 40 ++++ target/ppc/translate/fp-impl.c.inc | 289 ++++++++++------------------- target/ppc/translate/fp-ops.c.inc | 30 --- 6 files changed, 181 insertions(+), 255 deletions(-)
Signature · 1 line
2.49.0
PATCH 1/5 target/ppc: Move floating-point rounding and conversion instructions to decodetree.
Move below instructions to decodetree specification :
fr{sp, in, iz, im}[s][.],
fcti{w, d}[u, z, uz][s][.],
fcfid[s, u, us][s][.] : X-formThe changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op' flag.
--- target/ppc/fpu_helper.c | 34 +++++----- target/ppc/helper.h | 34 +++++----- target/ppc/insn32.decode | 24 ++++++++ target/ppc/translate/fp-impl.c.inc | 99 ++++++++++++------------------ target/ppc/translate/fp-ops.c.inc | 21 ------- 5 files changed, 98 insertions(+), 114 deletions(-)
target/ppc/fpu_helper.c +17 -17
@@ -562,14 +562,14 @@ uint64_t helper_##op(CPUPPCState *env, float64 arg) \return ret; \ } -FPU_FCTI(fctiw, int32, 0x80000000U) -FPU_FCTI(fctiwz, int32_round_to_zero, 0x80000000U) -FPU_FCTI(fctiwu, uint32, 0x00000000U) -FPU_FCTI(fctiwuz, uint32_round_to_zero, 0x00000000U) -FPU_FCTI(fctid, int64, 0x8000000000000000ULL) -FPU_FCTI(fctidz, int64_round_to_zero, 0x8000000000000000ULL) -FPU_FCTI(fctidu, uint64, 0x0000000000000000ULL) -FPU_FCTI(fctiduz, uint64_round_to_zero, 0x0000000000000000ULL) +FPU_FCTI(FCTIW, int32, 0x80000000U) +FPU_FCTI(FCTIWZ, int32_round_to_zero, 0x80000000U) +FPU_FCTI(FCTIWU, uint32, 0x00000000U) +FPU_FCTI(FCTIWUZ, uint32_round_to_zero, 0x00000000U) +FPU_FCTI(FCTID, int64, 0x8000000000000000ULL) +FPU_FCTI(FCTIDZ, int64_round_to_zero, 0x8000000000000000ULL) +FPU_FCTI(FCTIDU, uint64, 0x0000000000000000ULL) +FPU_FCTI(FCTIDUZ, uint64_round_to_zero, 0x0000000000000000ULL)#define FPU_FCFI (op, cvtr, is_single) \ uint64_t helper_##op(CPUPPCState *env, uint64_t arg) \
@@ -586,10 +586,10 @@ uint64_t helper_##op(CPUPPCState *env, uint64_t arg) \return farg.ll; \ } -FPU_FCFI(fcfid, int64_to_float64, 0) -FPU_FCFI(fcfids, int64_to_float32, 1) -FPU_FCFI(fcfidu, uint64_to_float64, 0) -FPU_FCFI(fcfidus, uint64_to_float32, 1) +FPU_FCFI(FCFID, int64_to_float64, 0) +FPU_FCFI(FCFIDS, int64_to_float32, 1) +FPU_FCFI(FCFIDU, uint64_to_float64, 0) +FPU_FCFI(FCFIDUS, uint64_to_float32, 1)static uint64_t do_fri (CPUPPCState *env,uint64_t arg,FloatRoundMode rounding_mode)
@@ -613,22 +613,22 @@ static uint64_t do_fri(CPUPPCState *env, uint64_t arg,return arg; } -uint64_t helper_frin (CPUPPCState *env,uint64_t arg) +uint64_t helper_FRIN (CPUPPCState *env,uint64_t arg) {return do_fri (env, arg, float_round_ties_away); } -uint64_t helper_friz (CPUPPCState *env,uint64_t arg) +uint64_t helper_FRIZ (CPUPPCState *env,uint64_t arg) {return do_fri (env, arg, float_round_to_zero); } -uint64_t helper_frip (CPUPPCState *env,uint64_t arg) +uint64_t helper_FRIP (CPUPPCState *env,uint64_t arg) {return do_fri (env, arg, float_round_up); } -uint64_t helper_frim (CPUPPCState *env,uint64_t arg) +uint64_t helper_FRIM (CPUPPCState *env,uint64_t arg) {return do_fri (env, arg, float_round_down); }
@@ -697,7 +697,7 @@ static uint64_t do_frsp(CPUPPCState *env, uint64_t arg, uintptr_t retaddr)return helper_todouble (f32); } -uint64_t helper_frsp (CPUPPCState *env,uint64_t arg) +uint64_t helper_FRSP (CPUPPCState *env,uint64_t arg) {return do_frsp (env, arg,GETPC ()); }
target/ppc/helper.h +17 -17
@@ -97,23 +97,23 @@ DEF_HELPER_FLAGS_1(tosingle, TCG_CALL_NO_RWG_SE, i32, i64) DEF_HELPER_4(fcmpo, void, env, i64, i64, i32) DEF_HELPER_4(fcmpu, void, env, i64, i64, i32) -DEF_HELPER_2(fctiw, i64, env, i64) -DEF_HELPER_2(fctiwu, i64, env, i64) -DEF_HELPER_2(fctiwz, i64, env, i64) -DEF_HELPER_2(fctiwuz, i64, env, i64) -DEF_HELPER_2(fcfid, i64, env, i64) -DEF_HELPER_2(fcfidu, i64, env, i64) -DEF_HELPER_2(fcfids, i64, env, i64) -DEF_HELPER_2(fcfidus, i64, env, i64) -DEF_HELPER_2(fctid, i64, env, i64) -DEF_HELPER_2(fctidu, i64, env, i64) -DEF_HELPER_2(fctidz, i64, env, i64) -DEF_HELPER_2(fctiduz, i64, env, i64) -DEF_HELPER_2(frsp, i64, env, i64) -DEF_HELPER_2(frin, i64, env, i64) -DEF_HELPER_2(friz, i64, env, i64) -DEF_HELPER_2(frip, i64, env, i64) -DEF_HELPER_2(frim, i64, env, i64) +DEF_HELPER_2(FCTIW, i64, env, i64) +DEF_HELPER_2(FCTIWU, i64, env, i64) +DEF_HELPER_2(FCTIWZ, i64, env, i64) +DEF_HELPER_2(FCTIWUZ, i64, env, i64) +DEF_HELPER_2(FCFID, i64, env, i64) +DEF_HELPER_2(FCFIDU, i64, env, i64) +DEF_HELPER_2(FCFIDS, i64, env, i64) +DEF_HELPER_2(FCFIDUS, i64, env, i64) +DEF_HELPER_2(FCTID, i64, env, i64) +DEF_HELPER_2(FCTIDU, i64, env, i64) +DEF_HELPER_2(FCTIDZ, i64, env, i64) +DEF_HELPER_2(FCTIDUZ, i64, env, i64) +DEF_HELPER_2(FRSP, i64, env, i64) +DEF_HELPER_2(FRIN, i64, env, i64) +DEF_HELPER_2(FRIZ, i64, env, i64) +DEF_HELPER_2(FRIP, i64, env, i64) +DEF_HELPER_2(FRIM, i64, env, i64) DEF_HELPER_3(FADD, f64, env, f64, f64)DEF_HELPER_3 (FADDS , f64, env, f64, f64)
target/ppc/insn32.decode +24 -0
@@ -541,6 +541,30 @@ FNMADDS 111011 ..... ..... ..... ..... 11111 . @A FNMSUB 111111 ..... ..... ..... ..... 11110 . @A FNMSUBS 111011 ..... ..... ..... ..... 11110 . @A +### Floating-Point Rounding and Conversion Instructions + +FRSP 111111 ..... ----- ..... 0000001100 . @X_tb_rc + +FRIN 111111 ..... ----- ..... 0110001000 . @X_tb_rc +FRIZ 111111 ..... ----- ..... 0110101000 . @X_tb_rc +FRIP 111111 ..... ----- ..... 0111001000 . @X_tb_rc +FRIM 111111 ..... ----- ..... 0111101000 . @X_tb_rc + +FCTIW 111111 ..... ----- ..... 0000001110 . @X_tb_rc +FCTIWU 111111 ..... ----- ..... 0010001110 . @X_tb_rc +FCTIWZ 111111 ..... ----- ..... 0000001111 . @X_tb_rc +FCTIWUZ 111111 ..... ----- ..... 0010001111 . @X_tb_rc + +FCTID 111111 ..... ----- ..... 1100101110 . @X_tb_rc +FCTIDU 111111 ..... ----- ..... 1110101110 . @X_tb_rc +FCTIDZ 111111 ..... ----- ..... 1100101111 . @X_tb_rc +FCTIDUZ 111111 ..... ----- ..... 1110101111 . @X_tb_rc + +FCFID 111111 ..... ----- ..... 1101001110 . @X_tb_rc +FCFIDS 111011 ..... ----- ..... 1101001110 . @X_tb_rc +FCFIDU 111111 ..... ----- ..... 1111001110 . @X_tb_rc +FCFIDUS 111011 ..... ----- ..... 1111001110 . @X_tb_rc + ### Floating-Point Select Instruction FSEL 111111 ..... ..... ..... ..... 10111 . @A
target/ppc/translate/fp-impl.c.inc +40 -59
117 lines not on this page · raw message
target/ppc/translate/fp-ops.c.inc +0 -21
@@ -1,24 +1,3 @@ -#define GEN_FLOAT_B(name, op2, op3, set_fprf, type) \ -GEN_HANDLER(f##name, 0x3F, op2, op3, 0x001F0000, type) - -GEN_FLOAT_B(ctiw, 0x0E, 0x00, 0, PPC_FLOAT), -GEN_HANDLER_E(fctiwu, 0x3F, 0x0E, 0x04, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_FLOAT_B(ctiwz, 0x0F, 0x00, 0, PPC_FLOAT), -GEN_HANDLER_E(fctiwuz, 0x3F, 0x0F, 0x04, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_FLOAT_B(rsp, 0x0C, 0x00, 1, PPC_FLOAT), -GEN_HANDLER_E(fcfid, 0x3F, 0x0E, 0x1A, 0x001F0000, PPC_NONE, PPC2_FP_CVT_S64), -GEN_HANDLER_E(fcfids, 0x3B, 0x0E, 0x1A, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_HANDLER_E(fcfidu, 0x3F, 0x0E, 0x1E, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_HANDLER_E(fcfidus, 0x3B, 0x0E, 0x1E, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_HANDLER_E(fctid, 0x3F, 0x0E, 0x19, 0x001F0000, PPC_NONE, PPC2_FP_CVT_S64), -GEN_HANDLER_E(fctidu, 0x3F, 0x0E, 0x1D, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_HANDLER_E(fctidz, 0x3F, 0x0F, 0x19, 0x001F0000, PPC_NONE, PPC2_FP_CVT_S64), -GEN_HANDLER_E(fctiduz, 0x3F, 0x0F, 0x1D, 0, PPC_NONE, PPC2_FP_CVT_ISA206), -GEN_FLOAT_B(rin, 0x08, 0x0C, 1, PPC_FLOAT_EXT), -GEN_FLOAT_B(riz, 0x08, 0x0D, 1, PPC_FLOAT_EXT), -GEN_FLOAT_B(rip, 0x08, 0x0E, 1, PPC_FLOAT_EXT), -GEN_FLOAT_B(rim, 0x08, 0x0F, 1, PPC_FLOAT_EXT), - GEN_HANDLER_E(lfdepx, 0x1F, 0x1F, 0x12, 0x00000001, PPC_NONE, PPC2_BOOKE206), GEN_HANDLER_E(lfiwax, 0x1f, 0x17, 0x1a, 0x00000001, PPC_NONE, PPC2_ISA205), GEN_HANDLER_E(lfiwzx, 0x1f, 0x17, 0x1b, 0x1, PPC_NONE, PPC2_FP_CVT_ISA206),
Signature · 1 line
2.49.0
PATCH 2/5 target/ppc: Move floating-point compare instructions to decodetree.
In reply to Chinmay RathMove below instructions to decodetree specification :
fcmp{u, o} : X-formThe changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op' flag.
--- target/ppc/fpu_helper.c | 4 +-- target/ppc/helper.h | 4 +-- target/ppc/insn32.decode | 5 ++++ target/ppc/translate/fp-impl.c.inc | 45 +++++++++--------------------- target/ppc/translate/fp-ops.c.inc | 2 -- 5 files changed, 22 insertions(+), 38 deletions(-)
target/ppc/fpu_helper.c +2 -2
@@ -871,7 +871,7 @@ uint32_t helper_FTSQRT(uint64_t frb)return 0x8 | (fg_flag ?4 :0 ) | (fe_flag ?2 :0 ); } -void helper_fcmpu (CPUPPCState *env,uint64_t arg1,uint64_t arg2, +void helper_FCMPU (CPUPPCState *env,uint64_t arg1,uint64_t arg2,uint32_t crfD) {CPU_DoubleU farg1, farg2;
@@ -902,7 +902,7 @@ void helper_fcmpu(CPUPPCState *env, uint64_t arg1, uint64_t arg2, } } -void helper_fcmpo (CPUPPCState *env,uint64_t arg1,uint64_t arg2, +void helper_FCMPO (CPUPPCState *env,uint64_t arg1,uint64_t arg2,uint32_t crfD) {CPU_DoubleU farg1, farg2;
target/ppc/helper.h +2 -2
@@ -94,8 +94,8 @@ DEF_HELPER_2(fpscr_setbit, void, env, i32) DEF_HELPER_FLAGS_1(todouble, TCG_CALL_NO_RWG_SE, i64, i32) DEF_HELPER_FLAGS_1(tosingle, TCG_CALL_NO_RWG_SE, i32, i64) -DEF_HELPER_4(fcmpo, void, env, i64, i64, i32) -DEF_HELPER_4(fcmpu, void, env, i64, i64, i32) +DEF_HELPER_4(FCMPO, void, env, i64, i64, i32) +DEF_HELPER_4(FCMPU, void, env, i64, i64, i32) DEF_HELPER_2(FCTIW, i64, env, i64)DEF_HELPER_2 (FCTIWU , i64, env, i64)
target/ppc/insn32.decode +5 -0
@@ -565,6 +565,11 @@ FCFIDS 111011 ..... ----- ..... 1101001110 . @X_tb_rc FCFIDU 111111 ..... ----- ..... 1111001110 . @X_tb_rc FCFIDUS 111011 ..... ----- ..... 1111001110 . @X_tb_rc +### Floating-Point Compare Instructions + +FCMPU 111111 ... -- ..... ..... 0000000000 - @X_bf +FCMPO 111111 ... -- ..... ..... 0000100000 - @X_bf + ### Floating-Point Select Instruction FSEL 111111 ..... ..... ..... ..... 10111 . @A
target/ppc/translate/fp-impl.c.inc +13 -32
59 lines not on this page · raw message
target/ppc/translate/fp-ops.c.inc +0 -2
@@ -10,8 +10,6 @@ GEN_STXF(stfiw, st32fiw, 0x17, 0x1E, PPC_FLOAT_STFIWX) GEN_HANDLER_E(stfdepx, 0x1F, 0x1F, 0x16, 0x00000001, PPC_NONE, PPC2_BOOKE206), GEN_HANDLER_E(stfdpx, 0x1F, 0x17, 0x1C, 0x00200001, PPC_NONE, PPC2_ISA205), -GEN_HANDLER(fcmpo, 0x3F, 0x00, 0x01, 0x00600001, PPC_FLOAT), -GEN_HANDLER(fcmpu, 0x3F, 0x00, 0x00, 0x00600001, PPC_FLOAT), GEN_HANDLER(fabs, 0x3F, 0x08, 0x08, 0x001F0000, PPC_FLOAT), GEN_HANDLER(fmr, 0x3F, 0x08, 0x02, 0x001F0000, PPC_FLOAT), GEN_HANDLER(fnabs, 0x3F, 0x08, 0x04, 0x001F0000, PPC_FLOAT),
Signature · 1 line
2.49.0
Re: [PATCH 2/5] target/ppc: Move floating-point compare instructions to decodetree.
Quoted 4 lines · Chinmay Rath
target/ppc/translate/fp-impl.c.inc +4
-0+static bool do_helper_cmp(DisasContext *ctx, arg_X_bf *a, + void (*helper)(TCGv_env, TCGv_i64, TCGv_i64, + TCGv_i32)) + REQUIRE_INSNS_FLAGS(ctx, FLOAT);
...
target/ppc/translate/fp-impl.c.inc static bool trans_FTSQRT(DisasContext *ctx, arg_X_bf_b *a) · line 280
Quoted 2 lines
target/ppc/translate/fp-impl.c.inc +2
-0+TRANS(FCMPU, do_helper_cmp, gen_helper_FCMPU); +TRANS(FCMPO, do_helper_cmp, gen_helper_FCMPO);
It's probably better to standardize on TRANS_FLAGS even though the flags checked is the same for both of these.
But anyway,
r~
Re: [PATCH 2/5] target/ppc: Move floating-point compare instructions to decodetree.
Quoted 6 lines · Richard Henderson
Quoted 4 lines · Chinmay Rath
+static bool do_helper_cmp(DisasContext *ctx,
arg_X_bf*a,
+ void (*helper)(TCGv_env,TCGv_i64,TCGv_i64, +TCGv_i32))
+REQUIRE_INSNS_FLAGS(ctx, FLOAT);
Quoted 6 lines
...
target/ppc/translate/fp-impl.c.inc static bool trans_FTSQRT(DisasContext *ctx, arg_X_bf_b *a) · line 280
Quoted 2 lines
target/ppc/translate/fp-impl.c.inc +2
-0+TRANS(FCMPU, do_helper_cmp, gen_helper_FCMPU); +TRANS(FCMPO, do_helper_cmp, gen_helper_FCMPO);It's probably better to standardize on
TRANS_FLAGSeven though the flags checked is the same for both of these.
Oooh yeah, should absolutely do this. My bad I missed.
Thanks,
Chinmay
Quoted 6 lines
But anyway,
Reviewed-by Richard Henderson <[email protected]>r~
Re: [PATCH 2/5] target/ppc: Move floating-point compare instructions to decodetree.
In reply to Richard HendersonQuoted 6 lines · Richard Henderson
Quoted 4 lines · Chinmay Rath
+static bool do_helper_cmp(DisasContext *ctx,
arg_X_bf*a,
+ void (*helper)(TCGv_env,TCGv_i64,TCGv_i64, +TCGv_i32))
+REQUIRE_INSNS_FLAGS(ctx, FLOAT);
Quoted 7 lines
...
target/ppc/translate/fp-impl.c.inc static bool trans_FTSQRT(DisasContext *ctx, arg_X_bf_b *a) · line 280
Quoted 2 lines
target/ppc/translate/fp-impl.c.inc +2
-0+TRANS(FCMPU, do_helper_cmp, gen_helper_FCMPU); +TRANS(FCMPO, do_helper_cmp, gen_helper_FCMPO);It's probably better to standardize on
TRANS_FLAGSeven though the flags checked is the same for both of these.
Hi Richard,
I did notice in the code that there are quite many instructions using TRANS and doing flag check in the common helper. For example, in target/ppc/translate/fixedpoint-impl.c.inc :
/static bool do_set_bool_cond(DisasContext *ctx, arg_X_bi *a, bool neg, bool rev) {
REQUIRE_INSNS_FLAGS2(ctx, ISA310);
uint32_t mask = 0x08 >> (a->bi & 0x03);
....
return true;
}
TRANS(SETBC, do_set_bool_cond, false, false) TRANS(SETBCR, do_set_bool_cond, false, true) TRANS(SETNBC, do_set_bool_cond, true, false) TRANS(SETNBCR, do_set_bool_cond, true, true) /
Do we want to standardize the use of TRANS_FLAGS in all such existing insns ?
I can send a followup patch doing the same for such insns (including the ones in this patch)
Thanks,
Chinmay
Quoted 5 lines
But anyway,
Reviewed-by Richard Henderson <[email protected]>r~
Re: [PATCH 2/5] target/ppc: Move floating-point compare instructions to decodetree.
Quoted 28 lines · Chinmay Rath
Quoted 6 lines · Richard Henderson
Quoted 4 lines · Chinmay Rath
+static bool do_helper_cmp(DisasContext *ctx,
arg_X_bf*a,
+ void (*helper)(TCGv_env,TCGv_i64,TCGv_i64, +TCGv_i32))
+REQUIRE_INSNS_FLAGS(ctx, FLOAT);Quoted 7 lines
...
target/ppc/translate/fp-impl.c.inc static bool trans_FTSQRT(DisasContext *ctx, arg_X_bf_b *a) · line 280
Quoted 2 lines
target/ppc/translate/fp-impl.c.inc +2
-0+TRANS(FCMPU, do_helper_cmp, gen_helper_FCMPU); +TRANS(FCMPO, do_helper_cmp, gen_helper_FCMPO);It's probably better to standardize on
TRANS_FLAGSeven though the flags checked is the same for both of these.Hi Richard,
I did notice in the code that there are quite many instructions using TRANS and doing flag check in the common helper. For example, in target/ppc/translate/fixedpoint-impl.c.inc :
/static bool
do_set_bool_cond(DisasContext *ctx, arg_X_bi *a, bool neg, bool rev){
REQUIRE_INSNS_FLAGS2(ctx, ISA310);
uint32_tmask =0x08>> (a->bi&0x03);
....
return true;
}
Quoted 7 lines
TRANS(SETBC, do_set_bool_cond, false, false)TRANS(SETBCR, do_set_bool_cond, false, true)TRANS(SETNBC, do_set_bool_cond, true, false)TRANS(SETNBCR, do_set_bool_cond, true, true)/Do we want to standardize the use of
TRANS_FLAGSin all such existing insns ?
Yes, I think so.
r~
PATCH 3/5 target/ppc: Move floating-point move instructions to decodetree.
In reply to Chinmay RathMove below instructions to decodetree specification:
f{mr, neg, abs, nabs} : X-formThe changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op' flag.
--- target/ppc/insn32.decode | 7 +++ target/ppc/translate/fp-impl.c.inc | 80 ++++++++---------------------- target/ppc/translate/fp-ops.c.inc | 4 -- 3 files changed, 28 insertions(+), 63 deletions(-)
target/ppc/insn32.decode +7 -0
@@ -503,6 +503,13 @@ STFDU 110111 ..... ...... ............... @D STFDX 011111 ..... ...... .... 1011010111 - @X STFDUX 011111 ..... ...... .... 1011110111 - @X +### Floating-Point Move Instructions + +FMR 111111 ..... ----- ..... 0001001000 . @X_tb_rc +FNEG 111111 ..... ----- ..... 0000101000 . @X_tb_rc +FABS 111111 ..... ----- ..... 0100001000 . @X_tb_rc +FNABS 111111 ..... ----- ..... 0010001000 . @X_tb_rc + ### Floating-Point Arithmetic Instructions FADD 111111 ..... ..... ..... ----- 10101 . @A_tab
target/ppc/translate/fp-impl.c.inc +21 -59
103 lines not on this page · raw message
target/ppc/translate/fp-ops.c.inc +0 -4
@@ -10,10 +10,6 @@ GEN_STXF(stfiw, st32fiw, 0x17, 0x1E, PPC_FLOAT_STFIWX) GEN_HANDLER_E(stfdepx, 0x1F, 0x1F, 0x16, 0x00000001, PPC_NONE, PPC2_BOOKE206), GEN_HANDLER_E(stfdpx, 0x1F, 0x17, 0x1C, 0x00200001, PPC_NONE, PPC2_ISA205), -GEN_HANDLER(fabs, 0x3F, 0x08, 0x08, 0x001F0000, PPC_FLOAT), -GEN_HANDLER(fmr, 0x3F, 0x08, 0x02, 0x001F0000, PPC_FLOAT), -GEN_HANDLER(fnabs, 0x3F, 0x08, 0x04, 0x001F0000, PPC_FLOAT), -GEN_HANDLER(fneg, 0x3F, 0x08, 0x01, 0x001F0000, PPC_FLOAT), GEN_HANDLER_E(fcpsgn, 0x3F, 0x08, 0x00, 0x00000000, PPC_NONE, PPC2_ISA205), GEN_HANDLER_E(fmrgew, 0x3F, 0x06, 0x1E, 0x00000001, PPC_NONE, PPC2_VSX207), GEN_HANDLER_E(fmrgow, 0x3F, 0x06, 0x1A, 0x00000001, PPC_NONE, PPC2_VSX207),
Signature · 1 line
2.49.0
PATCH 4/5 target/ppc: Move remaining floating-point move instructions to decodetree.
In reply to Chinmay RathMove below instructions to decodetree specification:
fcpsgn, fmrg{e, o}w : X-form
The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op' flag.
--- target/ppc/insn32.decode | 4 ++ target/ppc/translate/fp-impl.c.inc | 65 +++++++++++++----------------- target/ppc/translate/fp-ops.c.inc | 3 -- 3 files changed, 32 insertions(+), 40 deletions(-)
target/ppc/insn32.decode +4 -0
@@ -510,6 +510,10 @@ FNEG 111111 ..... ----- ..... 0000101000 . @X_tb_rc FABS 111111 ..... ----- ..... 0100001000 . @X_tb_rc FNABS 111111 ..... ----- ..... 0010001000 . @X_tb_rc +FCPSGN 111111 ..... ..... ..... 0000001000 . @X_rc +FMRGEW 111111 ..... ..... ..... 1111000110 - @X +FMRGOW 111111 ..... ..... ..... 1101000110 - @X + ### Floating-Point Arithmetic Instructions FADD 111111 ..... ..... ..... ----- 10101 . @A_tab
target/ppc/translate/fp-impl.c.inc +28 -37
90 lines not on this page · raw message
target/ppc/translate/fp-ops.c.inc +0 -3
@@ -10,9 +10,6 @@ GEN_STXF(stfiw, st32fiw, 0x17, 0x1E, PPC_FLOAT_STFIWX) GEN_HANDLER_E(stfdepx, 0x1F, 0x1F, 0x16, 0x00000001, PPC_NONE, PPC2_BOOKE206), GEN_HANDLER_E(stfdpx, 0x1F, 0x17, 0x1C, 0x00200001, PPC_NONE, PPC2_ISA205), -GEN_HANDLER_E(fcpsgn, 0x3F, 0x08, 0x00, 0x00000000, PPC_NONE, PPC2_ISA205), -GEN_HANDLER_E(fmrgew, 0x3F, 0x06, 0x1E, 0x00000001, PPC_NONE, PPC2_VSX207), -GEN_HANDLER_E(fmrgow, 0x3F, 0x06, 0x1A, 0x00000001, PPC_NONE, PPC2_VSX207), GEN_HANDLER(mcrfs, 0x3F, 0x00, 0x02, 0x0063F801, PPC_FLOAT), GEN_HANDLER(mtfsb0, 0x3F, 0x06, 0x02, 0x001FF800, PPC_FLOAT), GEN_HANDLER(mtfsb1, 0x3F, 0x06, 0x01, 0x001FF800, PPC_FLOAT),
Signature · 1 line
2.49.0
PATCH 5/5 MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs
In reply to Chinmay RathI have been working on Power ISA for a long time now and have mostly contributed in TCG instruction translation area (moved 300+ instructions to decodetree as of yet) and would like to continue contributing to PPC TCG in best possible ways I can. I think it's time to step up and assist in reviewing related patches to enable myself contribute more effectively in this direction.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -295,6 +295,7 @@ F: tests/tcg/openrisc/ PowerPC TCG CPUs M: Nicholas Piggin <[email protected]> M: Daniel Henrique Barboza <[email protected]> +R: Chinmay Rath <[email protected]> L: [email protected] S: Odd Fixes F: target/ppc/
Signature · 1 line
2.49.0
Re: [PATCH 5/5] MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs
Quoted 16 lines · Chinmay Rath
I have been working on Power ISA for a long time now and have mostly contributed in TCG instruction translation area (moved 300+ instructions to decodetree as of yet) and would like to continue contributing to PPC TCG in best possible ways I can. I think it's time to step up and assist in reviewing related patches to enable myself contribute more effectively in this direction.
Signed-off-by Chinmay Rath <[email protected]>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0
MAINTAINERS F: tests/tcg/openrisc/ · line 301
Quoted 7 lines
MAINTAINERS +1
-0@@ -295,6 +295,7 @@ F: tests/tcg/openrisc/ PowerPC TCG CPUs M: Nicholas Piggin <[email protected]> M: Daniel Henrique Barboza <[email protected]> +R: Chinmay Rath <[email protected]> L: [email protected] S: Odd Fixes F: target/ppc/
Thanks,
C.
Re: [PATCH 5/5] MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs
Quoted 28 lines · Cédric Le Goater
Quoted 16 lines · Chinmay Rath
I have been working on Power ISA for a long time now and have mostly contributed in TCG instruction translation area (moved 300+ instructions to decodetree as of yet) and would like to continue contributing to PPC TCG in best possible ways I can. I think it's time to step up and assist in reviewing related patches to enable myself contribute more effectively in this direction.
Signed-off-by Chinmay Rath <[email protected]>---
MAINTAINERS| 1 +1 file changed, 1 insertion(+)MAINTAINERS +0
-0@@ -295,6 +295,7 @@ F: tests/tcg/openrisc/Quoted 7 lines
PowerPC TCG CPUs
M: Nicholas Piggin <[email protected]>
M: Daniel Henrique Barboza <[email protected]> +R: Chinmay Rath <[email protected]>
L: [email protected]
S: Odd Fixes
F: target/ppc/Reviewed-by Cédric Le Goater <[email protected]>
Quoted 3 lines
Thanks,
C.
Thanks Cedric !
Thanks,
Chinmay
Quoted 2 lines · Chinmay Rath
Moving floating point rounding, conversion, compare and move instructions to decodetree specification.
Hi Richard,
Could you please share your review comments on this series ?
Thanks,
Chinmay
Quoted 19 lines
Also proposing myself as a reviewer for PowerPC TCG CPUs.
Chinmay Rath (5):
target/ppc: Move floating-point rounding and conversion instructions
to decodetree.
target/ppc: Move floating-point compare instructions to decodetree. target/ppc: Move floating-point move instructions to decodetree. target/ppc: Move remaining floating-point move instructions to
decodetree.
MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUsMAINTAINERS | 1 + target/ppc/fpu_helper.c | 38 ++-- target/ppc/helper.h | 38 ++-- target/ppc/insn32.decode | 40 ++++ target/ppc/translate/fp-impl.c.inc | 289 ++++++++++------------------- target/ppc/translate/fp-ops.c.inc | 30 --- 6 files changed, 181 insertions(+), 255 deletions(-)
Quoted 8 lines · Chinmay Rath
Chinmay Rath (5):
target/ppc: Move floating-point rounding and conversion instructions
to decodetree.
target/ppc: Move floating-point compare instructions to decodetree. target/ppc: Move floating-point move instructions to decodetree. target/ppc: Move remaining floating-point move instructions to
decodetree.
MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs
r~