On Sun, Nov 08, 2015 at 07:44:52PM -0500, Michael Meissner wrote:
> +/* Split a conversion from __float128 to an integer type into separate insns.
> +   OPERANDS points to the destination, source, and V2DI temporary
> +   register. CODE is either FIX or UNSIGNED_FIX.  */

dot space space

> +;; ISA 2.08 IEEE 128-bit floating point support.

3.0

> +(define_code_attr fix_fixuns  [(fix   "fix")   (unsigned_fix   "fixuns")])
> +(define_code_attr float_floatuns [(float "float") (unsigned_float 
> "floatuns")])

You could instead do an "uns" attribute so you would write fix<uns> etc.

> +;; 0 says do sign-extension, 1 says zero-extension
> +(define_insn "*ieee128_mtvsrw"
> +  [(set (match_operand:V2DI 0 "altivec_register_operand" "=v,v,v,v")
> +     (unspec:V2DI [(match_operand:SI 1 "nonimmediate_operand" "r,Z,r,Z")
> +                   (match_operand:SI 2 "const_0_to_1_operand" "O,O,n,n")]
> +                  UNSPEC_IEEE128_MOVE))]
> +  "TARGET_FLOAT128_HW"
> +  "@
> +   mtvsrwa %x0,%1
> +   lxsiwax %x0,%y1
> +   mtvsrwz %x0,%1
> +   lxsiwzx %x0,%y1"
> +  [(set_attr "type" "mffgpr,fpload,mffgpr,fpload")])

Tricky, is there no cleaner way to do this?


Segher

Reply via email to