diff options
author | Tanner Gooding <tagoo@outlook.com> | 2018-06-02 09:29:47 -0700 |
---|---|---|
committer | Tanner Gooding <tagoo@outlook.com> | 2018-06-02 14:23:38 -0700 |
commit | f38e04321720aedfd22d4d03ee32a932c74ae744 (patch) | |
tree | 2435e85601a51fe7f63ea83a0f7ed0be7a38df4d /src/jit/hwintrinsicxarch.h | |
parent | 1500926747f749be3f91ede49b458804566d5004 (diff) | |
download | coreclr-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.h | 43 |
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 |