This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: altivec very broken




On Sun, 9 Dec 2001, Daniel Berlin wrote:

> >
> > hotdog(){
> >         __builtin_altivec_vmadduwm (x, y);
> >
> > }
>
> Ditto the name of the function.
> Change it to vadduwm, and the problem goes away.

BTW, it's interesting to note that the use of vector_size makes the
generation of mem:SI instead of mem:V4SI for the globals go away.
No idea why.

>
>
> > litecycle:/build/t2/gcc$ ./cc1 b.c -maltivec -quiet
> > b.c: In function `hotdog':
> > b.c:8: insn does not satisfy its constraints:
> > (insn 34 31 15 (set (reg:V4SI 3 r3)
> >         (mem:V4SI (reg:SI 10 r10) [0 S16 A32])) 524 {altivec_lvx_4si} (nil)
> >     (nil))
>
> You can tell the real problem here because it's attempting to assign an
> integer register (reg:SI 10) to a vector memory slot.


Sorry, i've got this one wrong.
It actually fails the first constraint, because it finds that r3 is not a
V4SI mode register, and V4SI modes aren't allowed there.

It assigned r3 because of a combination of some bug thinking it was okay
(somewhere we've got a missing check), and not using abi=altivec.

If you use -mabi=altivec, it'll assign an okay register, and the problem
goes away.
But the test wouldn't work anyway, since it'll actually generate teh
following rtl:

(insn 13 11 15 (set (reg:V4SI 79 v2)
        (mem/f:V4SI (reg/f:SI 116) [0 x+0 S16 A128])) -1 (nil)
    (nil))

(insn 15 13 16 (set (reg:V4SI 79 v2)
        (mem/f:V4SI (reg/f:SI 118) [0 y+0 S16 A128])) -1 (nil)
    (nil))


(call_insn 16 15 17 (parallel[
            (set (reg:SI 3 r3)
                (call (mem:SI (symbol_ref:SI
("__builtin_altivec_vmadduwm")) [0 S4 A32])
                    (const_int 0 [0x0])))
            (use (const_int 4 [0x4]))
            (clobber (scratch:SI))
        ] ) -1 (nil)
    (nil)
    (expr_list (use (reg:V4SI 79 v2))
        (expr_list (use (reg:V4SI 79 v2))
	    (nil))))

So maybe we aren't assigning argument passing registers right for
-mabi=altivec, either.

>
>
> > b.c:8: Internal compiler error in final_scan_insn, at final.c:2576
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> > litecycle:/build/t2/gcc$
> >
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]