On Mon, Jun 18, 2012 at 4:59 AM, YeongKyoon Lee <yeongkyoon....@samsung.com> wrote: >> The idea looks nice, but instead of different TLB functions selected >> at configure time, the optimization should be enabled by default. >> >> Maybe a 'call' instruction could be used to jump to the slow path, >> that way the slow path could be shared. > > I had considered the approach of sharing slow path, actually argument > settings for ld/st helper functions. > However, the problem is that we don't know which runtime registers having > arguments.
Hm, I didn't consider that. > > There are three possible solutions for sharing, I think. > 1. Using code stub table including all the possible argument register > combinations > 2. Using register information flag constant generated at TCG time, and a > special stub which parsing the flag and setting the arguments > 3. Setting the arguments commonly for fast and slow paths, which needs > additional stack or register cleanup for fast path > > I think the solution #2 looks better for performance, however, it could be > implemented using jump and assembly because using call could come together > with unwanted code and register clobber by the prolog of callee. > But it might be painful of implementing the parsing stub using assembly (or > code generation). It is the weak point of solution #2. > > How do you think about it? I agree that #2 looks best. > > __________________________________ > Principal Engineer > VM Team > Yeongkyoon Lee > > S-Core Co., Ltd. > D.L.: +82-31-696-7249 > M.P.: +82-10-9965-1265 > __________________________________