From owner-svn-src-all@freebsd.org Wed Jan 17 17:11:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76C78E7B880; Wed, 17 Jan 2018 17:11:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51A8778542; Wed, 17 Jan 2018 17:11:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96B2C12528; Wed, 17 Jan 2018 17:11:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0HHBt2L082735; Wed, 17 Jan 2018 17:11:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0HHBtGP082733; Wed, 17 Jan 2018 17:11:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801171711.w0HHBtGP082733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 17 Jan 2018 17:11:55 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/lib/Target/X86/AsmParser lib/clang X-SVN-Commit-Revision: 328090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 17:11:56 -0000 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