summaryrefslogtreecommitdiff
path: root/src/jit/hwintrinsicxarch.h
diff options
context:
space:
mode:
authorTanner Gooding <tagoo@outlook.com>2018-06-02 09:29:47 -0700
committerTanner Gooding <tagoo@outlook.com>2018-06-02 14:23:38 -0700
commitf38e04321720aedfd22d4d03ee32a932c74ae744 (patch)
tree2435e85601a51fe7f63ea83a0f7ed0be7a38df4d /src/jit/hwintrinsicxarch.h
parent1500926747f749be3f91ede49b458804566d5004 (diff)
downloadcoreclr-f38e04321720aedfd22d4d03ee32a932c74ae744.tar.gz
coreclr-f38e04321720aedfd22d4d03ee32a932c74ae744.tar.bz2
coreclr-f38e04321720aedfd22d4d03ee32a932c74ae744.zip
Moving various x86 HWIntrinsicInfo lookup methods to be static methods on HWIntrinsicInfo
Diffstat (limited to 'src/jit/hwintrinsicxarch.h')
-rw-r--r--src/jit/hwintrinsicxarch.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/jit/hwintrinsicxarch.h b/src/jit/hwintrinsicxarch.h
index 67e2526ef2..2935057b35 100644
--- a/src/jit/hwintrinsicxarch.h
+++ b/src/jit/hwintrinsicxarch.h
@@ -141,10 +141,53 @@ struct HWIntrinsicInfo
static NamedIntrinsic lookupId(const char* className, const char* methodName);
static InstructionSet lookupIsa(const char* className);
+ // Member lookup
+
+ static NamedIntrinsic lookupId(NamedIntrinsic id)
+ {
+ return lookup(id).id;
+ }
+
static const char* lookupName(NamedIntrinsic id)
{
return lookup(id).name;
}
+
+ static InstructionSet lookupIsa(NamedIntrinsic id)
+ {
+ return lookup(id).isa;
+ }
+
+ static int lookupIval(NamedIntrinsic id)
+ {
+ return lookup(id).ival;
+ }
+
+ static unsigned lookupSimdSize(NamedIntrinsic id)
+ {
+ return lookup(id).simdSize;
+ }
+
+ static int lookupNumArgs(NamedIntrinsic id)
+ {
+ return lookup(id).numArgs;
+ }
+
+ static instruction lookupIns(NamedIntrinsic id, var_types type)
+ {
+ assert((type >= TYP_BYTE) && (type <= TYP_DOUBLE));
+ return lookup(id).ins[type - TYP_BYTE];
+ }
+
+ static HWIntrinsicCategory lookupCategory(NamedIntrinsic id)
+ {
+ return lookup(id).category;
+ }
+
+ static HWIntrinsicFlag lookupFlags(NamedIntrinsic id)
+ {
+ return lookup(id).flags;
+ }
};
#endif // FEATURE_HW_INTRINSICS