mirror of git://gcc.gnu.org/git/gcc.git
Add some sparc VIS3 move test cases.
gcc/testsuite/ * gcc.target/sparc/vis3move-1.c: New test. * gcc.target/sparc/vis3move-2.c: New test. * gcc.target/sparc/vis3move-3.c: New test. From-SVN: r180418
This commit is contained in:
parent
c04a30b4c0
commit
a160b43cf1
|
@ -1,3 +1,9 @@
|
|||
2011-10-24 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* gcc.target/sparc/vis3move-1.c: New test.
|
||||
* gcc.target/sparc/vis3move-2.c: New test.
|
||||
* gcc.target/sparc/vis3move-3.c: New test.
|
||||
|
||||
2011-10-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* gcc.dg/strlenopt-22.c: New testcase.
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target ilp32 } */
|
||||
/* { dg-options "-O1 -mvis3" } */
|
||||
|
||||
double d;
|
||||
float f;
|
||||
|
||||
int test_convert_from_float(void)
|
||||
{
|
||||
return f;
|
||||
}
|
||||
|
||||
int test_convert_from_double(void)
|
||||
{
|
||||
return d;
|
||||
}
|
||||
|
||||
float test_convert_to_float(int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
double test_convert_to_double(int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "movstouw\t%" 2 } } */
|
||||
/* { dg-final { scan-assembler-times "movwtos\t%" 2 } } */
|
|
@ -0,0 +1,29 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
/* { dg-options "-O1 -mvis3" } */
|
||||
|
||||
double d;
|
||||
float f;
|
||||
|
||||
long test_convert_from_float(void)
|
||||
{
|
||||
return f;
|
||||
}
|
||||
|
||||
long test_convert_from_double(void)
|
||||
{
|
||||
return d;
|
||||
}
|
||||
|
||||
float test_convert_to_float(long x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
double test_convert_to_double(long x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "movdtox\t%" 2 } } */
|
||||
/* { dg-final { scan-assembler-times "movxtod\t%" 2 } } */
|
|
@ -0,0 +1,41 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target ilp32 } */
|
||||
/* { dg-options "-O1 -mvis3" } */
|
||||
|
||||
float fnegs (float a)
|
||||
{
|
||||
return -a;
|
||||
}
|
||||
|
||||
double fnegd (double a)
|
||||
{
|
||||
return -a;
|
||||
}
|
||||
|
||||
float fmuls (float a, float b)
|
||||
{
|
||||
return a * b;
|
||||
}
|
||||
|
||||
double fmuld (double a, double b)
|
||||
{
|
||||
return a * b;
|
||||
}
|
||||
|
||||
double fsmuld (float a, float b)
|
||||
{
|
||||
return (double)a * (double)b;
|
||||
}
|
||||
|
||||
double fnsmuld (float a, float b)
|
||||
{
|
||||
return -((double)a * (double)b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "movwtos\t%" 13 } } */
|
||||
/* { dg-final { scan-assembler "fnegs\t%" } } */
|
||||
/* { dg-final { scan-assembler "fnegd\t%" } } */
|
||||
/* { dg-final { scan-assembler "fmuls\t%" } } */
|
||||
/* { dg-final { scan-assembler "fmuld\t%" } } */
|
||||
/* { dg-final { scan-assembler "fsmuld\t%" } } */
|
||||
/* { dg-final { scan-assembler "fnsmuld\t%" } } */
|
Loading…
Reference in New Issue