summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-05-03 05:44:26 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-05-03 05:44:26 +0000
commit8db45e4cf170cc6044a0afe7a0ed8876dcd9a863 (patch)
tree592333152462121ee4c75f78335acc53a68368ed /libclc/generic/include/clc
parent6146eda75dbf8e734b02d02a7c4a62804e04293f (diff)
downloadbcm5719-llvm-8db45e4cf170cc6044a0afe7a0ed8876dcd9a863.tar.gz
bcm5719-llvm-8db45e4cf170cc6044a0afe7a0ed8876dcd9a863.zip
remquo: Port from amd builtins
double version passes on carrizo. float version fails on denormals. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry <awatry@gmail.com> llvm-svn: 331434
Diffstat (limited to 'libclc/generic/include/clc')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/remquo.h18
-rw-r--r--libclc/generic/include/clc/math/remquo.inc1
3 files changed, 20 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index 75ca7d06644..171b06ac606 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -104,6 +104,7 @@
#include <clc/math/pown.h>
#include <clc/math/powr.h>
#include <clc/math/remainder.h>
+#include <clc/math/remquo.h>
#include <clc/math/rint.h>
#include <clc/math/rootn.h>
#include <clc/math/round.h>
diff --git a/libclc/generic/include/clc/math/remquo.h b/libclc/generic/include/clc/math/remquo.h
new file mode 100644
index 00000000000..7daf82fc34b
--- /dev/null
+++ b/libclc/generic/include/clc/math/remquo.h
@@ -0,0 +1,18 @@
+#define __CLC_FUNCTION remquo
+
+#define __CLC_BODY <clc/math/remquo.inc>
+#define __CLC_ADDRESS_SPACE global
+#include <clc/math/gentype.inc>
+#undef __CLC_ADDRESS_SPACE
+
+#define __CLC_BODY <clc/math/remquo.inc>
+#define __CLC_ADDRESS_SPACE local
+#include <clc/math/gentype.inc>
+#undef __CLC_ADDRESS_SPACE
+
+#define __CLC_BODY <clc/math/remquo.inc>
+#define __CLC_ADDRESS_SPACE private
+#include <clc/math/gentype.inc>
+#undef __CLC_ADDRESS_SPACE
+
+#undef __CLC_FUNCTION
diff --git a/libclc/generic/include/clc/math/remquo.inc b/libclc/generic/include/clc/math/remquo.inc
new file mode 100644
index 00000000000..42c7b6789f5
--- /dev/null
+++ b/libclc/generic/include/clc/math/remquo.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_ADDRESS_SPACE __CLC_INTN *q);
OpenPOWER on IntegriCloud