From: Tanner Gooding Date: Fri, 12 Jan 2018 05:27:23 +0000 (-0800) Subject: Adding support for the SSE MoveMask intrinsic X-Git-Tag: accepted/tizen/base/20180629.140029~127^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=baeed0c7cd1c9924579103fc03ff52e39ff11f6d;p=platform%2Fupstream%2Fcoreclr.git Adding support for the SSE MoveMask intrinsic --- diff --git a/src/jit/hwintrinsiccodegenxarch.cpp b/src/jit/hwintrinsiccodegenxarch.cpp index 0c223be..e2c86b9 100644 --- a/src/jit/hwintrinsiccodegenxarch.cpp +++ b/src/jit/hwintrinsiccodegenxarch.cpp @@ -548,6 +548,11 @@ void CodeGen::genSSEIntrinsic(GenTreeHWIntrinsic* node) emit->emitIns_SIMD_R_R_R(INS_movlhps, targetReg, op1Reg, op2Reg, TYP_SIMD16); break; + case NI_SSE_MoveMask: + assert(baseType == TYP_FLOAT); + emit->emitIns_SIMD_R_R(INS_movmskps, targetReg, op1Reg, TYP_INT); + break; + case NI_SSE_MoveScalar: assert(baseType == TYP_FLOAT); op2Reg = op2->gtRegNum; diff --git a/src/jit/hwintrinsicxarch.cpp b/src/jit/hwintrinsicxarch.cpp index f42470a..fcf0f44 100644 --- a/src/jit/hwintrinsicxarch.cpp +++ b/src/jit/hwintrinsicxarch.cpp @@ -616,6 +616,14 @@ GenTree* Compiler::impSSEIntrinsic(NamedIntrinsic intrinsic, break; } + case NI_SSE_MoveMask: + assert(sig->numArgs == 1); + assert(JITtype2varType(sig->retType) == TYP_INT); + assert(getBaseTypeOfSIMDType(info.compCompHnd->getArgClass(sig, sig->args)) == TYP_FLOAT); + op1 = impSIMDPopStack(TYP_SIMD16); + retNode = gtNewSimdHWIntrinsicNode(TYP_INT, op1, intrinsic, TYP_FLOAT, 16); + break; + case NI_SSE_StaticCast: { assert(sig->numArgs == 1); diff --git a/src/jit/instrsxarch.h b/src/jit/instrsxarch.h index e91e9c1..afb84a5 100644 --- a/src/jit/instrsxarch.h +++ b/src/jit/instrsxarch.h @@ -206,6 +206,7 @@ INST3( movupd, "movupd" , 0, IUM_WR, 0, 0, PCKDBL(0x11), BAD_CODE, PCK INST3( movups, "movups" , 0, IUM_WR, 0, 0, PCKFLT(0x11), BAD_CODE, PCKFLT(0x10)) INST3( movhlps, "movhlps" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, PCKFLT(0x12)) INST3( movlhps, "movlhps" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, PCKFLT(0x16)) +INST3( movmskps, "movmskps" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, PCKFLT(0x50)) INST3( unpckhps, "unpckhps" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, PCKFLT(0x15)) INST3( unpcklps, "unpcklps" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, PCKFLT(0x14))