On 10 March 2014 16:01, Richard Henderson <r...@twiddle.net> wrote: > On 03/10/2014 05:08 AM, Peter Maydell wrote: >> A quick grep of the uses of tcg_gen_exit_tb() suggests >> we would be better to change this function to take >> (TranslationBlock *tb, int tb_exit_code), possibly >> also with a special case for 0 if "tcg_gen_exit_tb(NULL, 0)" >> seems too verbose. > > No, since the goto_tb cases use (tb | n), so you wind up casting to an integer > type anyway.
I'm confused. I can't see any callers in git grep output which use 'tb | n': $ git grep gen_exit_tb | grep -c '|' 0 The only cases I see are: (1) tcg_gen_exit_tb(0) (2) tcg_gen_exit_tb((uintptr_t)tb) (3) tcg_gen_exit_tb((uintptr_t)tb + n) which I am proposing would be better written as tcg_gen_exit_tb(NULL, 0) tcg_gen_exit_tb(tb, 0) tcg_gen_exit_tb(tb, n) and letting tcg_gen_exit_tb() do the cast to uintptr_t and add. thanks -- PMM