Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2018 17:11:55 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328090 - in head: contrib/llvm/lib/Target/X86/AsmParser lib/clang
Message-ID:  <201801171711.w0HHBtGP082733@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801171711.w0HHBtGP082733>