mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 03:13:34 +00:00
Enable cl_khr_fp64 when building the library, and fix several bugs
uncovered when doing so. llvm-svn: 157617
This commit is contained in:
parent
20a5813a5f
commit
9acfba3322
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
clang -ccc-host-triple nvptx--nvidiacl -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file -Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h -Dcl_clang_storage_class_specifiers "$@"
|
clang -ccc-host-triple nvptx--nvidiacl -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file -Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h -Dcl_clang_storage_class_specifiers -Dcl_khr_fp64 "$@"
|
||||||
|
@ -93,6 +93,7 @@ for target in targets:
|
|||||||
# The rule for building a .bc file for the specified architecture using clang.
|
# The rule for building a .bc file for the specified architecture using clang.
|
||||||
clang_bc_flags = "-ccc-host-triple %s -I`dirname $in` %s " \
|
clang_bc_flags = "-ccc-host-triple %s -I`dirname $in` %s " \
|
||||||
"-Dcl_clang_storage_class_specifiers " \
|
"-Dcl_clang_storage_class_specifiers " \
|
||||||
|
"-Dcl_khr_fp64 " \
|
||||||
"-emit-llvm" % (target, clang_cl_includes)
|
"-emit-llvm" % (target, clang_cl_includes)
|
||||||
clang_bc_rule = "CLANG_CL_BC_" + target
|
clang_bc_rule = "CLANG_CL_BC_" + target
|
||||||
c_compiler_rule(b, clang_bc_rule, "LLVM-CC", llvm_clang, clang_bc_flags)
|
c_compiler_rule(b, clang_bc_rule, "LLVM-CC", llvm_clang, clang_bc_flags)
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#include <clc/clc.h>
|
#include <clc/clc.h>
|
||||||
|
|
||||||
|
#ifdef cl_khr_fp64
|
||||||
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BODY "length.inc"
|
#define BODY "length.inc"
|
||||||
#include <clc/geometric/floatn.inc>
|
#include <clc/geometric/floatn.inc>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
_CLC_OVERLOAD _CLC_DEF float length(FLOATN p) {
|
_CLC_OVERLOAD _CLC_DEF FLOAT length(FLOATN p) {
|
||||||
return native_sqrt(dot(p, p));
|
return native_sqrt(dot(p, p));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#include <clc/clc.h>
|
#include <clc/clc.h>
|
||||||
|
|
||||||
|
#ifdef cl_khr_fp64
|
||||||
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BODY "normalize.inc"
|
#define BODY "normalize.inc"
|
||||||
#include <clc/geometric/floatn.inc>
|
#include <clc/geometric/floatn.inc>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#include <clc/clc.h>
|
#include <clc/clc.h>
|
||||||
|
|
||||||
|
#ifdef cl_khr_fp64
|
||||||
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BODY <mad.inc>
|
#define BODY <mad.inc>
|
||||||
#include <clc/math/gentype.inc>
|
#include <clc/math/gentype.inc>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user