if (getLexer().is(AsmToken::EndOfStatement))
Parser.Lex(); // Consume the EndOfStatement
- // FIXME: Hack to handle recognize s{hr,ar,hl} <op>, $1. Canonicalize to
+ // FIXME: Hack to handle recognize s{hr,ar,hl} $1, <op>. Canonicalize to
// "shift <op>".
if ((Name.startswith("shr") || Name.startswith("sar") ||
Name.startswith("shl")) &&
Operands.erase(Operands.begin() + 1);
}
}
+
+ // FIXME: Hack to handle recognize "rc[lr] <op>" -> "rcl $1, <op>".
+ if ((Name.startswith("rcl") || Name.startswith("rcr")) &&
+ Operands.size() == 2) {
+ const MCExpr *One = MCConstantExpr::Create(1, getParser().getContext());
+ Operands.push_back(X86Operand::CreateImm(One, NameLoc, NameLoc));
+ std::swap(Operands[1], Operands[2]);
+ }
// FIXME: Hack to handle recognize "in[bwl] <op>". Canonicalize it to
// "inb <op>, %al".
fnstsw %ax
fnstsw %eax
fnstsw %al
+
+// rdar://8431880
+// CHECK: rclb $1, %bl
+// CHECK: rcll $1, 3735928559(%ebx,%ecx,8)
+// CHECK: rcrl $1, %ecx
+// CHECK: rcrl $1, 305419896
+
+rcl %bl
+rcll 0xdeadbeef(%ebx,%ecx,8)
+rcr %ecx
+rcrl 0x12345678