blob: 9fbb3efdf1ce07ad1bc0ccebf55d8a5f38b4e495 [file] [log] [blame]
#ifndef fma_4
#define fma_4
TYPE __attribute__((sseregparm))
test_noneg_add_noneg_add (TYPE a, TYPE b, TYPE c)
{
return ((a * b) + c) * b + c;
}
TYPE __attribute__((sseregparm))
test_noneg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
{
return ((a * b) + c) * b - c;
}
TYPE __attribute__((sseregparm))
test_noneg_add_neg_add (TYPE a, TYPE b, TYPE c)
{
return -((a * b) + c) * b + c;
}
TYPE __attribute__((sseregparm))
test_noneg_add_neg_sub (TYPE a, TYPE b, TYPE c)
{
return -((a * b) + c) * b - c;
}
TYPE __attribute__((sseregparm))
test_noneg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
{
return ((a * b) - c) * b + c;
}
TYPE __attribute__((sseregparm))
test_noneg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
{
return ((a * b) - c) * b - c;
}
TYPE __attribute__((sseregparm))
test_noneg_sub_neg_add (TYPE a, TYPE b, TYPE c)
{
return -((a * b) - c) * b + c;
}
TYPE __attribute__((sseregparm))
test_noneg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
{
return -((a * b) - c) * b - c;
}
TYPE __attribute__((sseregparm))
test_neg_add_noneg_add (TYPE a, TYPE b, TYPE c)
{
return (-(a * b) + c) * b + c;
}
TYPE __attribute__((sseregparm))
test_neg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
{
return (-(a * b) + c) * b - c;
}
TYPE __attribute__((sseregparm))
test_neg_add_neg_add (TYPE a, TYPE b, TYPE c)
{
return -(-(a * b) + c) * b + c;
}
TYPE __attribute__((sseregparm))
test_neg_add_neg_sub (TYPE a, TYPE b, TYPE c)
{
return -(-(a * b) + c) * b - c;
}
TYPE __attribute__((sseregparm))
test_neg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
{
return (-(a * b) - c) * b + c;
}
TYPE __attribute__((sseregparm))
test_neg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
{
return (-(a * b) - c) * b - c;
}
TYPE __attribute__((sseregparm))
test_neg_sub_neg_add (TYPE a, TYPE b, TYPE c)
{
return -(-(a * b) - c) * b + c;
}
TYPE __attribute__((sseregparm))
test_neg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
{
return -(-(a * b) - c) * b - c;
}
#endif