This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], Add power9 support to GCC, patch #6 (IEEE 128-bit hardware support)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 9 Nov 2015 13:29:17 -0600
- Subject: Re: [PATCH], Add power9 support to GCC, patch #6 (IEEE 128-bit hardware support)
- Authentication-results: sourceware.org; auth=none
- References: <20151103202911 dot GA5304 at ibm-tiger dot the-meissners dot org> <20151109004452 dot GF17170 at ibm-tiger dot the-meissners dot org>
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