On 8/3/20 3:35 AM, Frank Chang wrote: > i.e. > /DEF_HELPER_6(vslide1up_vx_w, void, ptr, ptr, *tl*, ptr, env, i32)/ vs. > /DEF_HELPER_6(vfslide1up_vf_h, void, ptr, ptr, *i64*, ptr, env, i32)/ > > As /opfvf_trans()/ and /opivx_trans()/ are shared among other instructions, > I wouldn't like to make prototype changes to these functions. > > So far what I can come up with is to extract the logic in /vslide1up/'s > helper function to an individual static function and make /vslide1up/ > and /vfslide1up/'s helper functions to call this static function. > > So that the're no redundant logic to be redefined. > However, this still require to declare /vfslide1up'/s/ /helper function > explicitly > as its function prototype is different with /vslide1up/.
Well, of course the alternative is to adjust the prototypes to be the same, avoiding TCGv and tl. That would require an adjustment in the translator though, which would require a different form of macro instead of GEN_OPIVX_TRANS. It could be cleanest to do what you have done; hard to tell. r~