提交 1da534ad 编写于 作者: S Szabolcs Nagy 提交者: Rich Felker

s390x: add single instruction fma and fmaf

These are available in the s390x baseline isa -march=z900.
上级 481006fd
#include <math.h>
double fma(double x, double y, double z)
{
__asm__ ("madbr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
return z;
}
#include <math.h>
float fmaf(float x, float y, float z)
{
__asm__ ("maebr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
return z;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册