//
bool CodeGen::genAdjustStackForPutArgStk(GenTreePutArgStk* putArgStk)
{
+#ifdef FEATURE_SIMD
+ if (varTypeIsSIMD(putArgStk))
+ {
+ const unsigned argSize = genTypeSize(putArgStk);
+ inst_RV_IV(INS_sub, REG_SPBASE, argSize, EA_PTRSIZE);
+ genStackLevel += argSize;
+ m_pushStkArg = false;
+ return true;
+ }
+#endif // FEATURE_SIMD
+
const unsigned argSize = putArgStk->getArgSize();
// If the gtPutArgStkKind is one of the push types, we do not pre-adjust the stack.
m_pushStkArg = true;
return false;
}
- m_pushStkArg = false;
- inst_RV_IV(INS_sub, REG_SPBASE, argSize, EA_PTRSIZE);
- genStackLevel += argSize;
- return true;
+ else
+ {
+ m_pushStkArg = false;
+ inst_RV_IV(INS_sub, REG_SPBASE, argSize, EA_PTRSIZE);
+ genStackLevel += argSize;
+ return true;
+ }
}
//---------------------------------------------------------------------
void CodeGen::genPutArgStk(GenTreePutArgStk* putArgStk)
{
var_types targetType = putArgStk->TypeGet();
+
#ifdef _TARGET_X86_
if (varTypeIsStruct(targetType))
{
emitAttr size = EA_SIZE(attr);
UNATIVE_OFFSET sz;
-#ifdef _TARGET_AMD64_
- // If Byte 4 (which is 0xFF00) is non-zero, that's where the RM encoding goes.
+
+ // If Byte 4 (which is 0xFF00) is zero, that's where the RM encoding goes.
// Otherwise, it will be placed after the 4 byte encoding, making the total 5 bytes.
// This would probably be better expressed as a different format or something?
- if (insCodeRM(ins) & 0xFF00)
+ if ((insCodeRM(ins) & 0xFF00) != 0)
{
sz = 5;
}
else
-#endif // _TARGET_AMD64_
{
code_t code = insCodeRM(ins);
sz = emitInsSize(insEncodeRMreg(ins, code));
// now we use the single source as source1 and source2.
if (IsThreeOperandBinaryAVXInstruction(ins))
{
- // encode source/dest operand reg in 'vvvv' bits in 1's compliement form
+ // encode source/dest operand reg in 'vvvv' bits in 1's complement form
code = insEncodeReg3456(ins, reg1, size, code);
}
else if (IsThreeOperandMoveAVXInstruction(ins))
{
- // encode source operand reg in 'vvvv' bits in 1's compliement form
+ // encode source operand reg in 'vvvv' bits in 1's complement form
code = insEncodeReg3456(ins, reg2, size, code);
}