Commit e0c39d66 by David S. Miller Committed by David S. Miller

Add sparc fmaf test.

gcc/testsuite/

	* gcc.target/sparc/fmaf-1.c: New test.

From-SVN: r180551
parent 9aa6a9b5
2011-10-26 David S. Miller <davem@davemloft.net>
* gcc.target/sparc/fmaf-1.c: New test.
* gcc.target/sparc/setcc-1.c: New test.
* gcc.target/sparc/setcc-2.c: New test.
......
/* { dg-do compile } */
/* { dg-options "-O2 -mfmaf" } */
float fmadds (float a, float b, float c)
{
return a * b + c;
}
float fmsubs (float a, float b, float c)
{
return a * b - c;
}
float fnmadds (float a, float b, float c)
{
return -(a * b + c);
}
float fnmsubs (float a, float b, float c)
{
return -(a * b - c);
}
double fmaddd (double a, double b, double c)
{
return a * b + c;
}
double fmsubd (double a, double b, double c)
{
return a * b - c;
}
double fnmaddd (double a, double b, double c)
{
return -(a * b + c);
}
double fnmsubd (double a, double b, double c)
{
return -(a * b - c);
}
/* { dg-final { scan-assembler "fmadds\t%" } } */
/* { dg-final { scan-assembler "fmsubs\t%" } } */
/* { dg-final { scan-assembler "fnmadds\t%" } } */
/* { dg-final { scan-assembler "fnmsubs\t%" } } */
/* { dg-final { scan-assembler "fmaddd\t%" } } */
/* { dg-final { scan-assembler "fmsubd\t%" } } */
/* { dg-final { scan-assembler "fnmaddd\t%" } } */
/* { dg-final { scan-assembler "fnmsubd\t%" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment