summaryrefslogtreecommitdiff
path: root/src/jit/hwintrinsicxarch.cpp
diff options
context:
space:
mode:
authorJacek Blaszczynski <biosciencenow@outlook.com>2018-03-01 19:26:29 +0100
committerTanner Gooding <tagoo@outlook.com>2018-03-05 19:17:25 -0800
commit393210965af830d2d90552a4101c91ec914473c1 (patch)
treeb775638559f29d0f3243c65cfe61e3f134b0529b /src/jit/hwintrinsicxarch.cpp
parentbf37beb54ef828e0400a3cd1a9f06f07e8ff8197 (diff)
downloadcoreclr-393210965af830d2d90552a4101c91ec914473c1.tar.gz
coreclr-393210965af830d2d90552a4101c91ec914473c1.tar.bz2
coreclr-393210965af830d2d90552a4101c91ec914473c1.zip
Implement LoadHigh, LoadLow, and SetScalarVector128 SSE2 HW intrinsics
Diffstat (limited to 'src/jit/hwintrinsicxarch.cpp')
-rw-r--r--src/jit/hwintrinsicxarch.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/jit/hwintrinsicxarch.cpp b/src/jit/hwintrinsicxarch.cpp
index 45d1eeea16..b48a1b170d 100644
--- a/src/jit/hwintrinsicxarch.cpp
+++ b/src/jit/hwintrinsicxarch.cpp
@@ -218,20 +218,26 @@ unsigned Compiler::simdSizeOfHWIntrinsic(NamedIntrinsic intrinsic, CORINFO_SIG_I
return simdSize;
}
+// TODO_XARCH-CQ - refactoring of numArgsOfHWIntrinsic fast path into inlinable
+// function and slow local static function may increase performance significantly
+
//------------------------------------------------------------------------
-// numArgsOfHWIntrinsic: get the number of arguments based on table and
-// if numArgs is -1 check number of arguments using GenTreeHWIntrinsic
-// node unless it is nullptr
+// numArgsOfHWIntrinsic: gets the number of arguments for the hardware intrinsic.
+// This attempts to do a table based lookup but will fallback to the number
+// of operands in 'node' if the table entry is -1.
//
// Arguments:
-// intrinsic -- id of the intrinsic function
// node -- GenTreeHWIntrinsic* node with nullptr default value
//
// Return Value:
// number of arguments
//
-int Compiler::numArgsOfHWIntrinsic(NamedIntrinsic intrinsic, GenTreeHWIntrinsic* node)
+int Compiler::numArgsOfHWIntrinsic(GenTreeHWIntrinsic* node)
{
+ assert(node != nullptr);
+
+ NamedIntrinsic intrinsic = node->gtHWIntrinsicId;
+
assert(intrinsic != NI_Illegal);
assert(intrinsic > NI_HW_INTRINSIC_START && intrinsic < NI_HW_INTRINSIC_END);
@@ -241,7 +247,6 @@ int Compiler::numArgsOfHWIntrinsic(NamedIntrinsic intrinsic, GenTreeHWIntrinsic*
return numArgs;
}
- noway_assert(node != nullptr);
assert(numArgs == -1);
GenTree* op1 = node->gtGetOp1();