On Tue, Sep 06, 2022 at 12:19:06PM -0500, Segher Boessenkool wrote: > On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: > > On 2/9/2022 下午 11:56, Segher Boessenkool wrote: > > >> - const signed long __builtin_vsx_scalar_extract_exp (double); > > >> + const unsigned long long __builtin_vsx_scalar_extract_exp (double); > > >> VSEEDP xsxexpdp {} > > >> > > >> - const signed long __builtin_vsx_scalar_extract_sig (double); > > >> + const unsigned long long __builtin_vsx_scalar_extract_sig (double); > > >> VSESDP xsxsigdp {} > > > This also brings these legacy builtins in line with the vec_ versions, > > > which are the preferred builtins (they are defined in the PVIPR). > > > > The return type of vec_ version built-ins are different than their > > definition > > in PVIPR. In PVIPR, they're vector unsigned int or vector unsigned long > > long. > > Shall we correct them? > > > > const vd __builtin_vsx_extract_exp_dp (vd); > > VEEDP xvxexpdp {} > > > > const vf __builtin_vsx_extract_exp_sp (vf); > > VEESP xvxexpsp {} > > > > const vd __builtin_vsx_extract_sig_dp (vd); > > VESDP xvxsigdp {} > > > > const vf __builtin_vsx_extract_sig_sp (vf); > > VESSP xvxsigsp {} > > Those are the vsx_ versions. I'm not sure what you're asking. > > It won't be easy at all to change types from vector integer to vector > float, it will break all over. A compatibility nightmare. It is better > if you can show the current stuff cannot ever work, it's not a problem > to replace it in that case.
I think Hao Chen is concerned about the return types: > > const vd __builtin_vsx_extract_exp_dp (vd); > > VEEDP xvxexpdp {} Per PVIPR, this should return vector unsigned long long ("vull" not "vd"). > > const vf __builtin_vsx_extract_exp_sp (vf); > > VEESP xvxexpsp {} This should return vector unsigned int ("vui" not "vf"). > > const vd __builtin_vsx_extract_sig_dp (vd); > > VESDP xvxsigdp {} This should return vector unsigned long long ("vull" not "vd"). > > const vf __builtin_vsx_extract_sig_sp (vf); > > VESSP xvxsigsp {} This should return vector unsigned int ("vui" not "vf"). PC