SPIR/generate_spir_wrapper.py: fix atomic_xchg / atomic_cmpxchg
fix the old-style atomics to take correct number of arguments
@@ -116,11 +116,6 @@ OLD_ATOMICS_INT_ONLY = [
"atomic_max",
]
-OLD_ATOMICS_ALL = [
- "atomic_xchg",
- "atomic_cmpxchg",
-]
-
SVM_ATOMICS_INT_ONLY = [
"atomic_fetch_add",
@@ -850,6 +845,11 @@ for mang_type in ['i', 'j', "l", "m"]:
generate_function("atomic_inc", SIG_TO_LLVM_TYPE_MAP[mang_type], LLVM_TYPE_EXT_MAP[mang_type], True, 'PV'+mang_type)
generate_function("atomic_dec", SIG_TO_LLVM_TYPE_MAP[mang_type], LLVM_TYPE_EXT_MAP[mang_type], True, 'PV'+mang_type)
+for mang_type in ['i', 'j', "l", "m", "f", "d"]:
+ generate_function("atomic_xchg", SIG_TO_LLVM_TYPE_MAP[mang_type], LLVM_TYPE_EXT_MAP[mang_type], True, 'PV'+mang_type, mang_type)
+ generate_function("atomic_cmpxchg", SIG_TO_LLVM_TYPE_MAP[mang_type], LLVM_TYPE_EXT_MAP[mang_type], True, 'PV'+mang_type, mang_type, mang_type)
+
+
for mang_type in ['i', 'j', "l", "m", "f", "d"]:
generate_function("atomic_init", SIG_TO_LLVM_TYPE_MAP['v'], LLVM_TYPE_EXT_MAP['v'], True, 'PVA'+mang_type, mang_type)
for f in SVM_ATOMICS_ALL:
