s390x: add single instruction fma and fmaf
These are available in the s390x baseline isa -march=z900.
This commit is contained in:
1 parent
481006fd88
commit
1da534ada8
2 files changed
+14
No files matched your search
@@ -0,0 +1,7 @@
|
||||
#include <math.h>
|
||||
|
||||
double fma(double x, double y, double z)
|
||||
{
|
||||
__asm__ ("madbr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
|
||||
return z;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <math.h>
|
||||
|
||||
float fmaf(float x, float y, float z)
|
||||
{
|
||||
__asm__ ("maebr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y));
|
||||
return z;
|
||||
}
|
||||
Reference in new issue
Block a user