/// X86 bit-test instructions.
BT,
- /// X86 SetCC. Operand 1 is condition code, and operand 2 is the flag
+ /// X86 SetCC. Operand 0 is condition code, and operand 1 is the flag
/// operand produced by a CMP instruction.
SETCC,
- /// X86 conditional moves. Operand 1 and operand 2 are the two values
- /// to select from (operand 1 is a R/W operand). Operand 3 is the
- /// condition code, and operand 4 is the flag operand produced by a CMP
- /// or TEST instruction. It also writes a flag result.
+ /// X86 conditional moves. Operand 0 and operand 1 are the two values
+ /// to select from. Operand 2 is the condition code, and operand 3 is the
+ /// flag operand produced by a CMP or TEST instruction. It also writes a
+ /// flag result.
CMOV,
- /// X86 conditional branches. Operand 1 is the chain operand, operand 2
- /// is the block to branch if condition is true, operand 3 is the
- /// condition code, and operand 4 is the flag operand produced by a CMP
+ /// X86 conditional branches. Operand 0 is the chain operand, operand 1
+ /// is the block to branch if condition is true, operand 2 is the
+ /// condition code, and operand 3 is the flag operand produced by a CMP
/// or TEST instruction.
BRCOND,
- /// Return with a flag operand. Operand 1 is the chain operand, operand
- /// 2 is the number of bytes of stack to pop.
+ /// Return with a flag operand. Operand 0 is the chain operand, operand
+ /// 1 is the number of bytes of stack to pop.
RET_FLAG,
/// REP_STOS - Repeat fill, corresponds to X86::REP_STOSx.
PCMPEQB, PCMPEQW, PCMPEQD, PCMPEQQ,
PCMPGTB, PCMPGTW, PCMPGTD, PCMPGTQ,
- // ADD, SUB, SMUL, UMUL - Arithmetic operations with overflow/carry
- // intrinsics.
- ADD, SUB, SMUL, UMUL
+ // ADD, SUB, SMUL, UMUL, etc. - Arithmetic operations with FLAGS results.
+ ADD, SUB, SMUL, UMUL,
+ INC, DEC,
+
+ // MUL_IMM - X86 specific multiply by immediate.
+ MUL_IMM
};
}
bool invSrc = false) const;
/// Utility function to emit atomic min and max. It takes the min/max
- // instruction to expand, the associated basic block, and the associated
- // cmov opcode for moving the min or max value.
+ /// instruction to expand, the associated basic block, and the associated
+ /// cmov opcode for moving the min or max value.
MachineBasicBlock *EmitAtomicMinMaxWithCustomInserter(MachineInstr *BInstr,
MachineBasicBlock *BB,
unsigned cmovOpc) const;
+
+ /// Emit nodes that will be selected as "test Op0,Op0", or something
+ /// equivalent, for use with the given x86 condition code.
+ SDValue EmitTest(SDValue Op0, unsigned X86CC, SelectionDAG &DAG);
+
+ /// Emit nodes that will be selected as "cmp Op0,Op1", or something
+ /// equivalent, for use with the given x86 condition code.
+ SDValue EmitCmp(SDValue Op0, SDValue Op1, unsigned X86CC,
+ SelectionDAG &DAG);
};
namespace X86 {