Author: dim Date: Wed Jan 17 17:11:55 2018 New Revision: 328090 URL: https://svnweb.freebsd.org/changeset/base/328090
Log: 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 Modified: head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/lib/clang/freebsd_cc_version.h Modified: head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Jan 17 17:08:26 2018 (r328089) +++ head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Jan 17 17:11:55 2018 (r328090) @@ -2375,6 +2375,13 @@ bool X86AsmParser::ParseInstruction(ParseInstructionIn .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 Modified: head/lib/clang/freebsd_cc_version.h ============================================================================== --- head/lib/clang/freebsd_cc_version.h Wed Jan 17 17:08:26 2018 (r328089) +++ head/lib/clang/freebsd_cc_version.h Wed Jan 17 17:11:55 2018 (r328090) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1200008 +#define FREEBSD_CC_VERSION 1200009 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"