[patch] Intrinsic functions for SPARC VIS instructions.
James A. Morrison
ja2morri@csclub.uwaterloo.ca
Sun Nov 21 20:29:00 GMT 2004
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
> I think you should simply say in the comment that faligndata only makes sense
> in conjunction with alignaddr, in that the 2 arguments must directly come
> from the latter.
>
> > I think we want the following for alignaddr:
> >
> > (define_insn "alignaddr<P:mode>_vis"
> > [(set (match_operand:P 0 "register_operand" "=r")
> > (unspec:P [(match_operand:P 1 "reg_or_0_operand" "%rJ")
> > (match_operand:SI 2 "reg_or_0_operand" "rJ")]
> > UNSPEC_ALIGNADDR))]
> > "TARGET_VIS"
> > "alignaddr\t%r1, %r2, %0")
>
> You don't need "%" in the constraints because they are strictly identical.
> And I think we need DImode in 64-bit mode (hence P would work) for operand 2
> because the addition is performed on the 64 bits and the 64 bits matter for
> the result (well, at least on Solaris). So the builtins should use
> intSI_type_node and intDI_type_node respectively; if we ever provide the
> wrapper
Ok.
> void *vis_alignaddr(void *addr, int offset);
>
> the middle-end would generate the sign-extend.
Good point.
> --
> Eric Botcazou
I'll resubmit the patch after some testing.
--
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
More information about the Gcc-patches
mailing list