Make simd-methods-netcore.h less verbose.
authorZoltan Varga <vargaz@gmail.com>
Sun, 18 Aug 2019 09:23:15 +0000 (05:23 -0400)
committerZoltan Varga <vargaz@gmail.com>
Sun, 18 Aug 2019 09:23:15 +0000 (05:23 -0400)
Commit migrated from https://github.com/mono/mono/commit/157bb9f4e3aabed6e71513462c83f5ce1d60ac36

src/mono/mono/mini/simd-intrinsics-netcore.c
src/mono/mono/mini/simd-methods-netcore.h

index 61076dd..dc4ba85 100644 (file)
 #define MSGSTRFIELD(line) MSGSTRFIELD1(line)
 #define MSGSTRFIELD1(line) str##line
 static const struct msgstr_t {
-#define SIMD_METHOD(str,name) char MSGSTRFIELD(__LINE__) [sizeof (str)];
+#define METHOD(name) char MSGSTRFIELD(__LINE__) [sizeof (#name)];
+#define METHOD2(str,name) char MSGSTRFIELD(__LINE__) [sizeof (str)];
 #include "simd-methods-netcore.h"
-#undef SIMD_METHOD
+#undef METHOD
+#undef METHOD2
 } method_names = {
-#define SIMD_METHOD(str,name) str,
+#define METHOD(name) #name,
+#define METHOD2(str,name) str,
 #include "simd-methods-netcore.h"
-#undef SIMD_METHOD
+#undef METHOD
+#undef METHOD2
 };
 
 enum {
-#define SIMD_METHOD(str,name) name = offsetof (struct msgstr_t, MSGSTRFIELD(__LINE__)),
+#define METHOD(name) SN_ ## name = offsetof (struct msgstr_t, MSGSTRFIELD(__LINE__)),
+#define METHOD2(str,name) SN_ ## name = offsetof (struct msgstr_t, MSGSTRFIELD(__LINE__)),
 #include "simd-methods-netcore.h"
 };
 #define method_name(idx) ((const char*)&method_names + (idx))
index a6a675c..744947f 100644 (file)
@@ -1,24 +1,33 @@
-SIMD_METHOD(".ctor", SN_ctor)
-SIMD_METHOD("Equals", SN_Equals)
-SIMD_METHOD("GreaterThan", SN_GreaterThan)
-SIMD_METHOD("LessThan", SN_LessThan)
-SIMD_METHOD("Min", SN_Min)
-SIMD_METHOD("Max", SN_Max)
-SIMD_METHOD("PopCount", SN_PopCount)
-SIMD_METHOD("get_Count", SN_get_Count)
-SIMD_METHOD("get_IsHardwareAccelerated", SN_get_IsHardwareAccelerated)
-SIMD_METHOD("get_IsSupported", SN_get_IsSupported)
-SIMD_METHOD("get_AllOnes", SN_get_AllOnes)
-SIMD_METHOD("get_Item", SN_get_Item)
-SIMD_METHOD("get_One", SN_get_One)
-SIMD_METHOD("get_Zero", SN_get_Zero)
-SIMD_METHOD("op_Addition", SN_op_Addition)
-SIMD_METHOD("op_BitwiseAnd", SN_op_BitwiseAnd)
-SIMD_METHOD("op_BitwiseOr", SN_op_BitwiseOr)
-SIMD_METHOD("op_Division", SN_op_Division)
-SIMD_METHOD("op_Equality", SN_op_Equality)
-SIMD_METHOD("op_ExclusiveOr", SN_op_ExclusiveOr)
-SIMD_METHOD("op_Explicit", SN_op_Explicit)
-SIMD_METHOD("op_Inequality", SN_op_Inequality)
-SIMD_METHOD("op_Multiply", SN_op_Multiply)
-SIMD_METHOD("op_Subtraction", SN_op_Subtraction)
+METHOD2(".ctor", ctor)
+METHOD(Equals)
+METHOD(GreaterThan)
+METHOD(LessThan)
+METHOD(Min)
+METHOD(Max)
+METHOD(PopCount)
+METHOD(get_Count)
+METHOD(get_IsHardwareAccelerated)
+METHOD(get_IsSupported)
+METHOD(get_AllOnes)
+METHOD(get_Item)
+METHOD(get_One)
+METHOD(get_Zero)
+METHOD(op_Addition)
+METHOD(op_BitwiseAnd)
+METHOD(op_BitwiseOr)
+METHOD(op_Division)
+METHOD(op_Equality)
+METHOD(op_ExclusiveOr)
+METHOD(op_Explicit)
+METHOD(op_Inequality)
+METHOD(op_Multiply)
+METHOD(op_Subtraction)
+
+// BMI1
+//METHOD(AndNot)
+//METHOD(BitFieldExtract)
+//METHOD(SIMDExtractLowestSetBit)
+//METHOD(GetMaskUpToLowestSetBit)
+//METHOD(ResetLowestSetBit)
+METHOD(TrailingZeroCount)
+