This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: altivec patches
> Do you really need this? It looks just like the way a normal memory
> operand is printed (for the cases that are allowed for altivec).
>
> > Index: rs6000.md
>
> Can you put the altivec insns in their own .md file and use the include
> mechanism? I believe this is what it was intended for.
Who does the approvals for my patches? I sent them out ages ago. I
guess I'd better do it again ....
>
> > + ;; No code is needed to copy between vector registers.
> > + (define_insn "*altivec_vec_move"
> > + [(set (match_operand 0 "altivec_register" "=v")
> > + (match_operand 1 "altivec_register" "v"))]
> > + "TARGET_ALTIVEC"
> > + ""
> > + [(set_attr "type" "altivec")])
>
> Um, that can't possibly be right. Also, it should be part of
> movv4si_internal, because reload needs all the move insns to be the
> same pattern.
>
> > + ;; Vector move instructions.
> > + (define_expand "movv4si"
> > + [(set (match_operand:V4SI 0 "nonimmediate_operand" "")
> > + (match_operand:V4SI 1 "any_operand" ""))]
> > + "TARGET_ALTIVEC"
> > + "{ rs6000_emit_move (operands[0], operands[1], V4SImode); DONE; }")
> > +
> > + (define_insn "*movv4si_internal"
> > + [(set (match_operand:V4SI 0 "nonimmediate_operand" "=m,v")
> > + (match_operand:V4SI 1 "input_operand" "v,m"))]
> > + "TARGET_ALTIVEC"
> > + "@
> > + stvx\t%1,%y0
> > + ldvx\t%0,%y1"
> > + [(set_attr "type" "altivec")])
>
> Yes---this needs an alternative to copy a 'v' into a 'v'. All the
> ones below probably need it too.
>
> > + (define_expand "movv8hi"
> > + [(set (match_operand:V8HI 0 "nonimmediate_operand" "")
> > + (match_operand:V8HI 1 "any_operand" ""))]
> > + "TARGET_ALTIVEC"
> > + "{ rs6000_emit_move (operands[0], operands[1], V8HImode); DONE; }")
> > +
> > + (define_insn "*movv8hi_internal1"
> > + [(set (match_operand:V8HI 0 "nonimmediate_operand" "=m,v")
> > + (match_operand:V8HI 1 "input_operand" "v,m"))]
> > + "TARGET_ALTIVEC"
> > + "@
> > + stvx\t%1,%y0
> > + ldvx\t%0,%y1"
> > + [(set_attr "type" "altivec")])
> > +
> > + (define_expand "movv16qi"
> > + [(set (match_operand:V16QI 0 "nonimmediate_operand" "")
> > + (match_operand:V16QI 1 "any_operand" ""))]
> > + "TARGET_ALTIVEC"
> > + "{ rs6000_emit_move (operands[0], operands[1], V16QImode); DONE; }")
> > +
> > + (define_insn "*movv16qi_internal1"
> > + [(set (match_operand:V16QI 0 "nonimmediate_operand" "=m,v")
> > + (match_operand:V16QI 1 "input_operand" "v,m"))]
> > + "TARGET_ALTIVEC"
> > + "@
> > + stvx\t%1,%y0
> > + ldvx\t%0,%y1"
> > + [(set_attr "type" "altivec")])
> > +
> > + (define_expand "movv4sf"
> > + [(set (match_operand:V4SF 0 "nonimmediate_operand" "")
> > + (match_operand:V4SF 1 "any_operand" ""))]
> > + "TARGET_ALTIVEC"
> > + "{ rs6000_emit_move (operands[0], operands[1], V4SFmode); DONE; }")
> > +
> > + (define_insn "*movv4sf_internal1"
> > + [(set (match_operand:V4SF 0 "nonimmediate_operand" "=m,v")
> > + (match_operand:V4SF 1 "input_operand" "v,m"))]
> > + "TARGET_ALTIVEC"
> > + "@
> > + stvx\t%1,%y0
> > + ldvx\t%0,%y1"
> > + [(set_attr "type" "altivec")])
> > +
> > + ;; Simple binary operations.
> > +
> >
> > -- boring builtins deleted--
> >
> > + (define_insn "altivec_vxor"
> > + [(set (match_operand:V4SI 0 "register_operand" "=v")
> > + (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
> > + (match_operand:V4SI 2 "register_operand" "v")] 136))]
> > + "TARGET_ALTIVEC"
> > + "vxor\t%0,%1,%2"
> > + [(set_attr "type" "altivec")])
>
> --
> - Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>
Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299