This is the mail archive of the gcc-patches@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: [PATCH 5/5][testsuite] Use stdint.h when needing int of exact size


On Tue, Jul 24, 2007 at 11:24:40PM +0200, Richard Guenther wrote:
> On 7/24/07, Rask Ingemann Lambertsen <rask@sygehus.dk> wrote:

> >on c4x-unknown-coff, you get
> >
> >$ ./xgcc -B./ ~/simd-1.c -S -o /dev/null
> >/home/rask/simd-1.c:7: error: unable to emulate SI
> >/home/rask/simd-1.c:8: error: unable to emulate SI
> >
> >and SImode would be 128-bits on that target. Simd-4.c makes an endianess 
> >test
> >and wants an 8 byte vector with two elements, each of which can hold at 
> >most
> >0xffffffff. All three testcases use a union for type conversion. 
> >Suggestions
> >are welcome.
> 
> SImode is always 4 bytes

   No. SImode is 4 * BITS_PER_UNIT and on the c4x, BITS_PER_UNIT is 32
so SImode is 128 bits on the c4x.

> and it is required to "exist".

   I do wonder how it has been disabled on the c4x.

> So
> 
> typedef int __attribute__((mode(SI))) __attribute__((vector_size (16)))
> 
> cannot work.

   It seems works fine on x86_64-unknown-linux-gnu to define them like this

typedef int __attribute__((mode(SI))) __attribute__((vector_size (16))) vecint;
typedef int __attribute__((mode(SI))) siint;

and the asm output contains the expected V4SI instructions, e.g.

        paddd   j(%rip), %xmm0  # 7     *addv4si3       [length = 8]
        movdqa  %xmm0, res(%rip)        # 10    *movv4si_internal/3 [length = 7]

-- 
Rask Ingemann Lambertsen


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