Hi! On Mon, Feb 05, 2018 at 05:57:51PM -0500, Michael Meissner wrote: > > We have > > > > (define_code_attr su [(sign_extend "s") > > (zero_extend "u") > > (fix "s") > > (unsigned_fix "s") > > (float "s") > > (unsigned_float "u")]) > > > > and "s" for unsigned_fix seems like it should be "u". Very surprising > > otherwise (if this is needed in some case, it should just write "s" there > > instead of "<su>").
What about this? > I found as long as I avoid putting the <su> or <u> in the output template > (i.e. use an output statement instead of a template) it works. It only > seems to fail in the IEEE128 case, and not in the SFDF case. I will submit a > bug report on it after this gets checked in, as it will be simpler to provide > a patch that people can test. Thanks. > +(define_insn_and_split "fix<uns>_trunc<SFDF:mode><QHI:mode>2" > + [(set (match_operand:<QHI:MODE> 0 "gpc_reg_operand" "=wJ,wJwK,r") > + (any_fix:QHI (match_operand:SFDF 1 "gpc_reg_operand" "wJ,wJwK,wa"))) > + (clobber (match_scratch:SI 2 "=X,X,wi"))] > + "TARGET_DIRECT_MOVE" > + "@ > + fctiw<u>z %0,%1 > + xscvdp<su>xws %x0,%x1 This one cannot work with the <su> definition above, for example. > +(define_insn "fix<uns>_<IEEE128:mode><SDI:mode>2_hw" > + [(set (match_operand:SDI 0 "altivec_register_operand" "=v") > + (any_fix:SDI (match_operand:IEEE128 1 "altivec_register_operand" "v")))] > + "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<IEEE128:MODE>mode)" > +{ > + return (<CODE> == UNSIGNED_FIX) ? "xscvqpu<wd>z %0,%1" : "xscvqps<wd>z > %0,%1"; > +} And it may well be why you need this. Rest looks good :-) Segher