assert (oper == GT_OR ||
oper == GT_XOR ||
oper == GT_AND ||
+ oper == GT_ADD_LO ||
oper == GT_ADD_HI ||
+ oper == GT_SUB_LO ||
oper == GT_SUB_HI ||
oper == GT_MUL_HI ||
oper == GT_DIV_HI ||
__fallthrough;
#if !defined(_TARGET_64BIT_)
+ case GT_ADD_LO:
case GT_ADD_HI:
+ case GT_SUB_LO:
case GT_SUB_HI:
#endif // !defined(_TARGET_64BIT_)
case GT_ADD:
case GT_SUB: ins = INS_sub; break;
case GT_XOR: ins = INS_xor; break;
#if !defined(_TARGET_64BIT_)
+ case GT_ADD_LO: ins = INS_add; break;
case GT_ADD_HI: ins = INS_adc; break;
+ case GT_SUB_LO: ins = INS_sub; break;
case GT_SUB_HI: ins = INS_sbb; break;
#endif // !defined(_TARGET_64BIT_)
default: unreached();
assert(gtOper == GT_MUL || gtOper == GT_CAST ||
gtOper == GT_ADD || gtOper == GT_SUB ||
gtOper == GT_ASG_ADD || gtOper == GT_ASG_SUB ||
+ gtOper == GT_ADD_LO || gtOper == GT_SUB_LO ||
gtOper == GT_ADD_HI || gtOper == GT_SUB_HI);
#else
assert(gtOper == GT_MUL || gtOper == GT_CAST ||
// The following are nodes representing the upper half of a 64-bit operation
// that requires a carry/borrow. However, they are all named GT_XXX_HI for
// consistency.
+GTNODE(ADD_LO , "+Lo" ,1,GTK_BINOP)
GTNODE(ADD_HI , "+Hi" ,1,GTK_BINOP)
+GTNODE(SUB_LO , "-Lo" ,0,GTK_BINOP)
GTNODE(SUB_HI , "-Hi" ,0,GTK_BINOP)
GTNODE(MUL_HI , "*Hi" ,1,GTK_BINOP)
GTNODE(DIV_HI , "/Hi" ,0,GTK_BINOP)
return GT_NONE;
}
}
+
+genTreeOps getLoOper(genTreeOps oper)
+{
+ switch(oper)
+ {
+ case GT_ADD: return GT_ADD_LO; break;
+ case GT_SUB: return GT_SUB_LO; break;
+ case GT_OR: return GT_OR; break;
+ case GT_AND: return GT_AND; break;
+ case GT_XOR: return GT_XOR; break;
+ default:
+ assert(!"getLoOper called for invalid oper");
+ return GT_NONE;
+ }
+}
#endif // !defined(_TARGET_64BIT_)
//------------------------------------------------------------------------
// We will reuse "tree" for the loResult, which will now be of TYP_INT, and its operands
// will be the lo halves of op1 from above.
loResult = tree;
+ loResult->SetOper(getLoOper(loResult->OperGet()));
loResult->gtType = TYP_INT;
loResult->gtOp.gtOp1 = loOp1;
loResult->gtOp.gtOp2 = loOp2;
info->dstCount = 0;
break;
+#if !defined(_TARGET_64BIT_)
+ case GT_ADD_LO:
+ case GT_ADD_HI:
+ case GT_SUB_LO:
+ case GT_SUB_HI:
+#endif
case GT_ADD:
case GT_SUB:
// SSE2 arithmetic instructions doesn't support the form "op mem, xmm".