On Sat, Apr 15, 2017 at 04:40:35 -0700, Richard Henderson wrote: > On 04/11/2017 06:17 PM, Emilio G. Cota wrote: > >This will be used by TCG targets to implement a fast path > >for indirect branches. > > > >I only have implemented and tested this on an i386 host, so > >make this opcode optional and mark it as not implemented by > >other TCG backends. > > I don't think this is quite the right abstraction. In particular, if we can > always return a valid address from the helper, we can eliminate a > conditional branch. > > I think this should work as follows: (snip)
Yes that's much better. In fact in the cover letter I forgot to mention that the code by the paper authors does something similar to avoid the branch. I went with the design with a branch because (1) I wasn't sure that exporting tb_ret_addr would get your approval and (2) my knowledge of TCG backend code is shamefully poor. Will work on a v2. Thanks for the feedback! Emilio