[libclc] r273042 - 64 bit integers are legal in full profile without an extension
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 17 13:30:41 PDT 2016
Author: jvesely
Date: Fri Jun 17 15:30:41 2016
New Revision: 273042
URL: http://llvm.org/viewvc/llvm-project?rev=273042&view=rev
Log:
64 bit integers are legal in full profile without an extension
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Tom Stellard <tom at stellard.net>
Modified:
libclc/trunk/configure.py
libclc/trunk/generic/lib/gen_convert.py
Modified: libclc/trunk/configure.py
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/configure.py?rev=273042&r1=273041&r2=273042&view=diff
==============================================================================
--- libclc/trunk/configure.py (original)
+++ libclc/trunk/configure.py Fri Jun 17 15:30:41 2016
@@ -198,7 +198,6 @@ for target in targets:
"-fno-builtin " \
"-Dcl_clang_storage_class_specifiers " \
"%s " \
- "-Dcles_khr_int64 " \
"-D__CLC_INTERNAL " \
"-emit-llvm" % (target, clang_cl_includes, device_defines)
if device['gpu'] != '':
Modified: libclc/trunk/generic/lib/gen_convert.py
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/gen_convert.py?rev=273042&r1=273041&r2=273042&view=diff
==============================================================================
--- libclc/trunk/generic/lib/gen_convert.py (original)
+++ libclc/trunk/generic/lib/gen_convert.py Fri Jun 17 15:30:41 2016
@@ -97,14 +97,12 @@ def conditional_guard(src, dst):
int64_count = int64_count +1
elif dst in float64_types:
float64_count = float64_count + 1
- if float64_count > 0 and int64_count > 0:
- print("#if defined(cl_khr_fp64) && defined(cles_khr_int64)")
- return True
- elif float64_count > 0:
+ if float64_count > 0:
+ #In embedded profile, if cl_khr_fp64 is supported cles_khr_int64 has to be
print("#ifdef cl_khr_fp64")
return True
elif int64_count > 0:
- print("#ifdef cles_khr_int64")
+ print("#if defined cles_khr_int64 || !defined(__EMBEDDED_PROFILE__)")
return True
return False
@@ -142,6 +140,15 @@ print("""/* !!!! AUTOGENERATED FILE gene
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+
+#if defined(__EMBEDDED_PROFILE__) && !defined(cles_khr_int64)
+#error Embedded profile that supports cl_khr_fp64 also has to support cles_khr_int64
+#endif
+
+#endif
+
+#ifdef cles_khr_int64
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
#endif
""")
More information about the cfe-commits
mailing list