fix rdar://7986634 - match instruction opcodes case insensitively.

llvm-svn: 104183
This commit is contained in:
Chris Lattner 2010-05-19 23:34:33 +00:00
parent 1c4687e350
commit 7cbfa4462f
2 changed files with 11 additions and 1 deletions

View File

@ -783,8 +783,13 @@ bool AsmParser::ParseStatement() {
return false;
}
// Canonicalize the opcode to lower case.
SmallString<128> Opcode;
for (unsigned i = 0, e = IDVal.size(); i != e; ++i)
Opcode.push_back(tolower(IDVal[i]));
SmallVector<MCParsedAsmOperand*, 8> ParsedOperands;
bool HadError = getTargetParser().ParseInstruction(IDVal, IDLoc,
bool HadError = getTargetParser().ParseInstruction(Opcode.str(), IDLoc,
ParsedOperands);
if (!HadError && Lexer.isNot(AsmToken::EndOfStatement))
HadError = TokError("unexpected token in argument list");

View File

@ -146,3 +146,8 @@ fadd %st(7)
// CHECK: leal 0, %eax
leal 0, %eax
// rdar://7986634 - Insensitivity on opcodes.
// CHECK: int3
INT3