On 06/02/2015 12:05 PM, Aurelien Jarno wrote: >> But why don't we just pass and return (most) of the data to the helper? Like >> >> C(0xb2a5, TRE, RRE, Z, 0, r2, r1_P, 0, tre, 0) >> >> potential_page_fault(s); >> gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2); >> return_low128(o->out2); >> set_cc_static(s); > > My point was that we need to pass 4 values (reg0, r1, r1+1 and r2) and > return 3 values (r1, r1+1 and cc), so it's probably better to pass all > of them the same way. It's the strategy chosen for other similar > instructions (e.g mvcl), except for cc. > > I'll change that in the next version.
The reg0 and cc data is at a fixed location, and are therefore more amenable to passing implicitly. It's r1, r1+1, and r2 that are in varying locations, and therefore you either have to pass their register number or their contents. For mvcl, there are 5 return values, so we're pretty much stuck passing register numbers. r~