RE: [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate
> -Original Message- > From: Peter Maydell > Sent: Sunday, July 12, 2020 2:50 AM > To: Wu, Wentong > Cc: QEMU Developers ; QEMU Trivial > ; Chris Wulff ; Marek Vasut > > Subject: Re: [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing > more to generate > > On Fri, 10 Jul 2020 at 16:46, Wentong Wu wrote: > > > > Add DISAS_NORETURN case for nothing more to generate because at > > runtime execution will never return from some helper call. And at the > > same time replace DISAS_UPDATE in t_gen_helper_raise_exception and > > gen_exception with the newly added DISAS_NORETURN. > > > > Signed-off-by: Wentong Wu > > Hi; I'm going to pick these up and get them into master. > > A couple of notes below for if you plan to submit more patches to QEMU in > future: these are really just minor workflow things, but they do help make > our lives easier in getting code submissions into the tree. Thanks Peter, I will follow the process to submit more patches to QEMU project, and I really learn a lot! Thanks > If people provide you with a Reviewed-by: tag for a patch, and you don't > change it when you send out an updated version, it's helpful if you include > that tag in the commit message of the revised version you send out. This > saves people having to remember whether they'd reviewed something or not, and > means that when applying I don't have to go back and look at old versions to > see who reviewed what. > > Patch series are much easier for our tooling to deal with if you send them > out with a cover letter email (a 0/n email which all the other emails are > followups to; git format-patch has a '--cover-letter' option which will do > the right thing here). > > We document this kind of workflow stuff here: > https://wiki.qemu.org/Contribute/SubmitAPatch > > thanks > -- PMM
Re: [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate
On Fri, 10 Jul 2020 at 16:46, Wentong Wu wrote: > > Add DISAS_NORETURN case for nothing more to generate because at runtime > execution will never return from some helper call. And at the same time > replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception > with the newly added DISAS_NORETURN. > > Signed-off-by: Wentong Wu Hi; I'm going to pick these up and get them into master. A couple of notes below for if you plan to submit more patches to QEMU in future: these are really just minor workflow things, but they do help make our lives easier in getting code submissions into the tree. If people provide you with a Reviewed-by: tag for a patch, and you don't change it when you send out an updated version, it's helpful if you include that tag in the commit message of the revised version you send out. This saves people having to remember whether they'd reviewed something or not, and means that when applying I don't have to go back and look at old versions to see who reviewed what. Patch series are much easier for our tooling to deal with if you send them out with a cover letter email (a 0/n email which all the other emails are followups to; git format-patch has a '--cover-letter' option which will do the right thing here). We document this kind of workflow stuff here: https://wiki.qemu.org/Contribute/SubmitAPatch thanks -- PMM
[PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate
Add DISAS_NORETURN case for nothing more to generate because at runtime execution will never return from some helper call. And at the same time replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception with the newly added DISAS_NORETURN. Signed-off-by: Wentong Wu --- target/nios2/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index e17656e6..b052be85 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -149,7 +149,7 @@ static void t_gen_helper_raise_exception(DisasContext *dc, tcg_gen_movi_tl(dc->cpu_R[R_PC], dc->pc); gen_helper_raise_exception(dc->cpu_env, tmp); tcg_temp_free_i32(tmp); -dc->is_jmp = DISAS_UPDATE; +dc->is_jmp = DISAS_NORETURN; } static bool use_goto_tb(DisasContext *dc, uint32_t dest) @@ -802,7 +802,7 @@ static void gen_exception(DisasContext *dc, uint32_t excp) tcg_gen_movi_tl(cpu_R[R_PC], dc->pc); gen_helper_raise_exception(cpu_env, tmp); tcg_temp_free_i32(tmp); -dc->is_jmp = DISAS_UPDATE; +dc->is_jmp = DISAS_NORETURN; } /* generate intermediate code for basic block 'tb'. */ @@ -877,6 +877,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) tcg_gen_exit_tb(NULL, 0); break; +case DISAS_NORETURN: case DISAS_TB_JUMP: /* nothing more to generate */ break; -- 2.21.3