Pull in r322623 from upstream llvm trunk (by Andrew V. Tischenko):
Allow usage of X86-prefixes as separate instrs. Differential Revision: https://reviews.llvm.org/D42102 This should fix parse errors when x86 prefixes (such as 'lock' and 'rep') are followed by various non-mnemonic tokens, e.g. comments, .byte directives and labels. PR: 224669,225054
This commit is contained in:
parent
7e5f6f2588
commit
d23c4359df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328090
@ -2375,6 +2375,13 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
||||
.Cases("repne", "repnz", X86::IP_HAS_REPEAT_NE)
|
||||
.Default(X86::IP_NO_PREFIX); // Invalid prefix (impossible)
|
||||
Flags |= Prefix;
|
||||
if (getLexer().is(AsmToken::EndOfStatement)) {
|
||||
// We don't have real instr with the given prefix
|
||||
// let's use the prefix as the instr.
|
||||
// TODO: there could be several prefixes one after another
|
||||
Flags = X86::IP_NO_PREFIX;
|
||||
break;
|
||||
}
|
||||
Name = Parser.getTok().getString();
|
||||
Parser.Lex(); // eat the prefix
|
||||
// Hack: we could have something like "rep # some comment" or
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#define FREEBSD_CC_VERSION 1200008
|
||||
#define FREEBSD_CC_VERSION 1200009
|
||||
|
Loading…
Reference in New Issue
Block a user