PATCH: Add SSE4.1 support
Richard Henderson
rth@redhat.com
Fri Apr 20 20:09:00 GMT 2007
On Fri, Apr 20, 2007 at 12:00:59PM -0700, H. J. Lu wrote:
> +(define_insn "sse4_1_blendvpd"
> + [(set (match_operand:V2DF 0 "register_operand" "=x")
> + (unspec:V2DF [(match_operand:V2DF 1 "register_operand" "0")
> + (match_operand:V2DF 2 "nonimmediate_operand" "xm")
> + (match_operand:V2DF 3 "register_operand" "x")]
> + UNSPEC_BLENDV))]
> + "TARGET_SSE4_1 && ix86_sse_4_operands_ok (operands, V2DFmode)"
> + "blendvpd\t{%3, %2, %0|%0, %2, %3}"
> + [(set_attr "type" "ssemov")
> + (set_attr "mode" "V2DF")])
There should either be no operand 3, i.e. just (reg:V2DF FIRST_SSE_REG),
or you need to create a new predicate xmm0_register_operand:
(define_predicate "xmm0_register_operand"
(match_code "reg,subreg")
{
return true_regnum (op) == FIRST_SSE_REG;
})
and use (match_operand:V2DF 3 "xmm0_register_operand" ""). Note
the *empty* constraint string.
Also note this means that testing the predicate for op3 in the
expanders is useless. You'll need to *always* move the value
into the xmm0 register, so just emit_move_insn and be done with it.
r~
More information about the Gcc-patches
mailing list