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: [TESTCASE] New testcase for altivec


hi daniel.

found the problem.  this only showed up in linux because the
linux assembler is broken ;-) [see below].

i never saw the problem because i was using the darwin
assembler :).

matthew can take it from here, since he's the assembler
guy for altivec :).

thanks for pointing this out daniel, and for the testcase.

aldy

linuxppc:

   ac:   10 0d 08 2e     vmaddfp v0,v13,v1,v0

darwin:

   b4:   10 0d 00 6e     .long 0x100d006e

On Monday, March 18, 2002, at 01:45  AM, Daniel Egger wrote:

> Hija,
>
> since Aldy agreed this testcase should yield 7.0f's instead of 5.0f's
> would it be okay to add the following test (which fails right
> now on powerpc-linux-gnu) to the testsuite?
>
> 2002-03-17  Daniel Egger  <degger@fhm.edu>
>
>         * gcc.dg/altivec-5.c: New test.
>
> --
> Servus,
>        Daniel
> /* { dg-do run { target powerpc-*-*altivec powerpc-*-*-*altivec } } */
> /* { dg-options "-maltivec" } */
>
> /* Program to test PowerPC AltiVec multiply-add instruction.  */
>
> #include <altivec.h>
>
> extern void abort (void);
>
> int main ()
> {
>   static float storage[4] __attribute__ ((aligned(16)));
>
>   vector float one = (vector float) {1.0, 1.0, 1.0, 1.0};
>   vector float two = (vector float) {2.0, 2.0, 2.0, 2.0};
>   vector float three = (vector float) {3.0, 3.0, 3.0, 3.0};
>   vector float result;
>
>   result = vec_madd (three, two, one);
>   vec_st (result, 0, storage);
>
>   if (storage[0] > 7.1f || storage[0] < 6.9f)
>     abort ();
>
>   return 0;
> }
>
--
Aldy Hernandez                                E-mail: aldyh@redhat.com
Professional Gypsy Lost in Australia
Red Hat, Inc.


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