}]>;
def nearP2RemX : SDNodeXForm<imm, [{
uint64_t x =
- abs(N->getZExtValue() - getNearPower2((uint64_t)N->getZExtValue()));
+ abs64(N->getZExtValue() - getNearPower2((uint64_t)N->getZExtValue()));
return getI64Imm(Log2_64(x));
}]>;
getNearPower2((uint64_t)N->getZExtValue()));
}]>;
def immUExt8ME : PatLeaf<(imm), [{ //use this imm for mulqi
- int64_t d = abs((int64_t)N->getZExtValue() -
+ int64_t d = abs64((int64_t)N->getZExtValue() -
(int64_t)getNearPower2((uint64_t)N->getZExtValue()));
if (isPowerOf2_64(d)) return false;
switch (d) {
def ZAPNOTi : OFormL<0x12, 0x31, "zapnot $RA,$L,$RC", [], s_ishf>;
// Define the pattern that produces ZAPNOTi.
-def : Pat<(i64 (zappat GPRC:$RA):$imm),
+def : Pat<(zappat:$imm GPRC:$RA),
(ZAPNOTi GPRC:$RA, (iZAPX GPRC:$imm))>;
//load address, rellocated gpdist form
-let OutOperandList = (ops GPRC:$RA), InOperandList = (ops s16imm:$DISP, GPRC:$RB, s16imm:$NUM) in {
+let OutOperandList = (ops GPRC:$RA),
+ InOperandList = (ops s16imm:$DISP, GPRC:$RB, s16imm:$NUM),
+ mayLoad = 1 in {
def LDAg : MForm<0x08, 1, "lda $RA,0($RB)\t\t!gpdisp!$NUM", [], s_lda>; //Load address
def LDAHg : MForm<0x09, 1, "ldah $RA,0($RB)\t\t!gpdisp!$NUM", [], s_lda>; //Load address
}
def STQ_C : MForm<0x2F, 0, "stq_l $RA,$DISP($RB)", [], s_ist>;
def STL_C : MForm<0x2E, 0, "stl_l $RA,$DISP($RB)", [], s_ist>;
}
-let OutOperandList = (ops GPRC:$RA), InOperandList = (ops s64imm:$DISP, GPRC:$RB) in {
+let OutOperandList = (ops GPRC:$RA),
+ InOperandList = (ops s64imm:$DISP, GPRC:$RB),
+ mayLoad = 1 in {
def LDQ_L : MForm<0x2B, 1, "ldq_l $RA,$DISP($RB)", [], s_ild>;
def LDL_L : MForm<0x2A, 1, "ldl_l $RA,$DISP($RB)", [], s_ild>;
}
//An ugly trick to get the opcode as an imm I can use
def immBRCond : SDNodeXForm<imm, [{
switch((uint64_t)N->getZExtValue()) {
+ default: assert(0 && "Unknown branch type");
case 0: return getI64Imm(Alpha::BEQ);
case 1: return getI64Imm(Alpha::BNE);
case 2: return getI64Imm(Alpha::BGE);
case 23: return getI64Imm(Alpha::FBGT);
case 24: return getI64Imm(Alpha::FBLE);
case 25: return getI64Imm(Alpha::FBLT);
- default: assert(0 && "Unknown branch type");
}
}]>;