[Interop] Use m128 to declare simd type for Windows target and MSVC (#4219)
This commit is contained in:
+14
-1
@@ -848,7 +848,20 @@ internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVi
|
||||
output("typedef unsigned long long ${prefix}_KULong;")
|
||||
output("typedef float ${prefix}_KFloat;")
|
||||
output("typedef double ${prefix}_KDouble;")
|
||||
output("typedef float __attribute__ ((__vector_size__ (16))) ${prefix}_KVector128;")
|
||||
|
||||
val typedef_KVector128 = "typedef float __attribute__ ((__vector_size__ (16))) ${prefix}_KVector128;"
|
||||
if (context.config.target.family == Family.MINGW) {
|
||||
// Separate `output` for each line to ensure Windows EOL (LFCR), otherwise generated file will have inconsistent line ending.
|
||||
output("#ifndef _MSC_VER")
|
||||
output(typedef_KVector128)
|
||||
output("#else")
|
||||
output("#include <xmmintrin.h>")
|
||||
output("typedef __m128 ${prefix}_KVector128;")
|
||||
output("#endif")
|
||||
} else {
|
||||
output(typedef_KVector128)
|
||||
}
|
||||
|
||||
output("typedef void* ${prefix}_KNativePtr;")
|
||||
output("struct ${prefix}_KType;")
|
||||
output("typedef struct ${prefix}_KType ${prefix}_KType;")
|
||||
|
||||
Reference in New Issue
Block a user