From: Zoltan Varga Date: Sun, 18 Aug 2019 09:23:15 +0000 (-0400) Subject: Make simd-methods-netcore.h less verbose. X-Git-Tag: submit/tizen/20210909.063632~10331^2~5^2~729^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a93d4a64fc40534ae3a10cd39f0715f989762d1;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Make simd-methods-netcore.h less verbose. Commit migrated from https://github.com/mono/mono/commit/157bb9f4e3aabed6e71513462c83f5ce1d60ac36 --- diff --git a/src/mono/mono/mini/simd-intrinsics-netcore.c b/src/mono/mono/mini/simd-intrinsics-netcore.c index 61076dd..dc4ba85 100644 --- a/src/mono/mono/mini/simd-intrinsics-netcore.c +++ b/src/mono/mono/mini/simd-intrinsics-netcore.c @@ -21,17 +21,22 @@ #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)) diff --git a/src/mono/mono/mini/simd-methods-netcore.h b/src/mono/mono/mini/simd-methods-netcore.h index a6a675c..744947f 100644 --- a/src/mono/mono/mini/simd-methods-netcore.h +++ b/src/mono/mono/mini/simd-methods-netcore.h @@ -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) +