[X86] Merge printSSECC and printAVXCC. They only differed by an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2015-01-28 10:09:52 +00:00
parent d5bce3cab0
commit f3a2214da8
5 changed files with 10 additions and 36 deletions

View File

@@ -72,7 +72,9 @@ void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
printAnnotation(OS, Annot);
}
static void printSSEAVXCC(int64_t Imm, raw_ostream &O) {
void X86ATTInstPrinter::printSSEAVXCC(const MCInst *MI, unsigned Op,
raw_ostream &O) {
int64_t Imm = MI->getOperand(Op).getImm();
switch (Imm) {
default: llvm_unreachable("Invalid ssecc/avxcc argument!");
case 0: O << "eq"; break;
@@ -110,20 +112,6 @@ static void printSSEAVXCC(int64_t Imm, raw_ostream &O) {
}
}
void X86ATTInstPrinter::printSSECC(const MCInst *MI, unsigned Op,
raw_ostream &O) {
int64_t Imm = MI->getOperand(Op).getImm();
assert((Imm & 0x7) == Imm); // Ensure valid immediate.
printSSEAVXCC(Imm, O);
}
void X86ATTInstPrinter::printAVXCC(const MCInst *MI, unsigned Op,
raw_ostream &O) {
int64_t Imm = MI->getOperand(Op).getImm();
assert((Imm & 0x1f) == Imm); // Ensure valid immediate.
printSSEAVXCC(Imm, O);
}
void X86ATTInstPrinter::printRoundingControl(const MCInst *MI, unsigned Op,
raw_ostream &O) {
int64_t Imm = MI->getOperand(Op).getImm() & 0x3;