Message ID | 20201208003702.4088927-15-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | target/mips: Convert MSA ASE to decodetree | expand |
On 12/7/20 6:36 PM, Philippe Mathieu-Daudé wrote: > Make gen_msa() and gen_msa_branch() public declarations > so we can keep calling them once extracted from the big > translate.c in the next commit. > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > target/mips/translate.h | 2 ++ > target/mips/translate.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 12/8/20 5:56 PM, Richard Henderson wrote: > On 12/7/20 6:36 PM, Philippe Mathieu-Daudé wrote: >> Make gen_msa() and gen_msa_branch() public declarations >> so we can keep calling them once extracted from the big >> translate.c in the next commit. >> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >> --- >> target/mips/translate.h | 2 ++ >> target/mips/translate.c | 4 ++-- >> 2 files changed, 4 insertions(+), 2 deletions(-) > > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Actually, I think this should be dropped, and two other patches rearranged. r~
On 12/8/20 6:01 PM, Richard Henderson wrote: > On 12/8/20 5:56 PM, Richard Henderson wrote: >> On 12/7/20 6:36 PM, Philippe Mathieu-Daudé wrote: >>> Make gen_msa() and gen_msa_branch() public declarations >>> so we can keep calling them once extracted from the big >>> translate.c in the next commit. >>> >>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >>> --- >>> target/mips/translate.h | 2 ++ >>> target/mips/translate.c | 4 ++-- >>> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > > Actually, I think this should be dropped, and two other patches rearranged. Actually, nevermind, you already get the right result in the end; there's no point re-rearranging. r~
Hi Richard, On 12/9/20 1:03 AM, Richard Henderson wrote: > On 12/8/20 6:01 PM, Richard Henderson wrote: >> On 12/8/20 5:56 PM, Richard Henderson wrote: >>> On 12/7/20 6:36 PM, Philippe Mathieu-Daudé wrote: >>>> Make gen_msa() and gen_msa_branch() public declarations >>>> so we can keep calling them once extracted from the big >>>> translate.c in the next commit. >>>> >>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >>>> --- >>>> target/mips/translate.h | 2 ++ >>>> target/mips/translate.c | 4 ++-- >>>> 2 files changed, 4 insertions(+), 2 deletions(-) >>> >>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >> >> Actually, I think this should be dropped, and two other patches rearranged. > > Actually, nevermind, you already get the right result in the end; there's no > point re-rearranging. I'm interested in looking at your idea to see if I can follow it for the next conversions after the MSA ASE. The criteria I'm using is (in this order): - keep bisectability working - keep patches trivial enough to review - avoid moving things twice In a previous version I tried to directly pass from static void gen_msa(DisasContext *ctx) ... to: static bool trans_MSA(DisasContext *ctx, arg_MSA *a) ... without declaring the intermediate 'void gen_msa(DisasContext)' in "translate.h" (this patch). The result was less trivial to review, so I went back to using an intermediate patch for simplicity. Is that what you were thinking about? Thanks, Phil.
On 12/9/20 3:17 AM, Philippe Mathieu-Daudé wrote: > Hi Richard, > > On 12/9/20 1:03 AM, Richard Henderson wrote: > In a previous version I tried to directly pass from > > static void gen_msa(DisasContext *ctx) ... > > to: > > static bool trans_MSA(DisasContext *ctx, arg_MSA *a) ... > > without declaring the intermediate 'void gen_msa(DisasContext)' > in "translate.h" (this patch). The result was less trivial to > review, so I went back to using an intermediate patch for > simplicity. > > Is that what you were thinking about? Yes, exactly that. r~
diff --git a/target/mips/translate.h b/target/mips/translate.h index 765018beeea..c26b0d9155d 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -82,5 +82,7 @@ extern TCGv bcond; /* MSA */ void msa_translate_init(void); +void gen_msa(DisasContext *ctx); +void gen_msa_branch(DisasContext *ctx, uint32_t op1); #endif diff --git a/target/mips/translate.c b/target/mips/translate.c index 8b1019506fe..d8553c626f3 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28668,7 +28668,7 @@ static bool gen_msa_BxZ(DisasContext *ctx, int df, int wt, int s16, bool if_not) return true; } -static void gen_msa_branch(DisasContext *ctx, uint32_t op1) +void gen_msa_branch(DisasContext *ctx, uint32_t op1) { uint8_t df = (ctx->opcode >> 21) & 0x3; uint8_t wt = (ctx->opcode >> 16) & 0x1f; @@ -30444,7 +30444,7 @@ static void gen_msa_vec(DisasContext *ctx) } } -static void gen_msa(DisasContext *ctx) +void gen_msa(DisasContext *ctx) { uint32_t opcode = ctx->opcode;
Make gen_msa() and gen_msa_branch() public declarations so we can keep calling them once extracted from the big translate.c in the next commit. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- target/mips/translate.h | 2 ++ target/mips/translate.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)