From owner-svn-src-vendor@freebsd.org Thu Aug 9 12:07:38 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8746E10637C0; Thu, 9 Aug 2018 12:07:38 +0000 (UTC) (envelope-from cognet@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 3ADEB8F67C; Thu, 9 Aug 2018 12:07:38 +0000 (UTC) (envelope-from cognet@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 1892C192AB; Thu, 9 Aug 2018 12:07:38 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w79C7bVn091393; Thu, 9 Aug 2018 12:07:37 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w79C7bLp091388; Thu, 9 Aug 2018 12:07:37 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201808091207.w79C7bLp091388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Thu, 9 Aug 2018 12:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337531 - in vendor-sys/ck/dist: include/gcc/ppc include/spinlock src X-SVN-Group: vendor-sys X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: in vendor-sys/ck/dist: include/gcc/ppc include/spinlock src X-SVN-Commit-Revision: 337531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 12:07:38 -0000 Author: cognet Date: Thu Aug 9 12:07:37 2018 New Revision: 337531 URL: https://svnweb.freebsd.org/changeset/base/337531 Log: Import CK as of commit 08813496570879fbcc2adcdd9ddc0a054361bfde, mostly to avoid using lwsync on ppc32. Modified: vendor-sys/ck/dist/include/gcc/ppc/ck_pr.h vendor-sys/ck/dist/include/spinlock/hclh.h vendor-sys/ck/dist/src/ck_barrier_combining.c Modified: vendor-sys/ck/dist/include/gcc/ppc/ck_pr.h ============================================================================== --- vendor-sys/ck/dist/include/gcc/ppc/ck_pr.h Thu Aug 9 11:46:12 2018 (r337530) +++ vendor-sys/ck/dist/include/gcc/ppc/ck_pr.h Thu Aug 9 12:07:37 2018 (r337531) @@ -67,21 +67,29 @@ ck_pr_stall(void) __asm__ __volatile__(I ::: "memory"); \ } -CK_PR_FENCE(atomic, "lwsync") -CK_PR_FENCE(atomic_store, "lwsync") +#ifdef CK_MD_PPC32_LWSYNC +#define CK_PR_LWSYNCOP "lwsync" +#else /* CK_MD_PPC32_LWSYNC_DISABLE */ +#define CK_PR_LWSYNCOP "sync" +#endif + +CK_PR_FENCE(atomic, CK_PR_LWSYNCOP) +CK_PR_FENCE(atomic_store, CK_PR_LWSYNCOP) CK_PR_FENCE(atomic_load, "sync") -CK_PR_FENCE(store_atomic, "lwsync") -CK_PR_FENCE(load_atomic, "lwsync") -CK_PR_FENCE(store, "lwsync") +CK_PR_FENCE(store_atomic, CK_PR_LWSYNCOP) +CK_PR_FENCE(load_atomic, CK_PR_LWSYNCOP) +CK_PR_FENCE(store, CK_PR_LWSYNCOP) CK_PR_FENCE(store_load, "sync") -CK_PR_FENCE(load, "lwsync") -CK_PR_FENCE(load_store, "lwsync") +CK_PR_FENCE(load, CK_PR_LWSYNCOP) +CK_PR_FENCE(load_store, CK_PR_LWSYNCOP) CK_PR_FENCE(memory, "sync") -CK_PR_FENCE(acquire, "lwsync") -CK_PR_FENCE(release, "lwsync") -CK_PR_FENCE(acqrel, "lwsync") -CK_PR_FENCE(lock, "lwsync") -CK_PR_FENCE(unlock, "lwsync") +CK_PR_FENCE(acquire, CK_PR_LWSYNCOP) +CK_PR_FENCE(release, CK_PR_LWSYNCOP) +CK_PR_FENCE(acqrel, CK_PR_LWSYNCOP) +CK_PR_FENCE(lock, CK_PR_LWSYNCOP) +CK_PR_FENCE(unlock, CK_PR_LWSYNCOP) + +#undef CK_PR_LWSYNCOP #undef CK_PR_FENCE Modified: vendor-sys/ck/dist/include/spinlock/hclh.h ============================================================================== --- vendor-sys/ck/dist/include/spinlock/hclh.h Thu Aug 9 11:46:12 2018 (r337530) +++ vendor-sys/ck/dist/include/spinlock/hclh.h Thu Aug 9 12:07:37 2018 (r337531) @@ -81,6 +81,8 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_q thread->wait = true; thread->splice = false; thread->cluster_id = (*local_queue)->cluster_id; + /* Make sure previous->previous doesn't appear to be NULL */ + thread->previous = *local_queue; /* Serialize with respect to update of local queue. */ ck_pr_fence_store_atomic(); @@ -91,13 +93,15 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_q /* Wait until previous thread from the local queue is done with lock. */ ck_pr_fence_load(); - if (previous->previous != NULL && - previous->cluster_id == thread->cluster_id) { - while (ck_pr_load_uint(&previous->wait) == true) + if (previous->previous != NULL) { + while (ck_pr_load_uint(&previous->wait) == true && + ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && + ck_pr_load_uint(&previous->splice) == false) ck_pr_stall(); /* We're head of the global queue, we're done */ - if (ck_pr_load_uint(&previous->splice) == false) + if (ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && + ck_pr_load_uint(&previous->splice) == false) return; } Modified: vendor-sys/ck/dist/src/ck_barrier_combining.c ============================================================================== --- vendor-sys/ck/dist/src/ck_barrier_combining.c Thu Aug 9 11:46:12 2018 (r337530) +++ vendor-sys/ck/dist/src/ck_barrier_combining.c Thu Aug 9 12:07:37 2018 (r337531) @@ -35,7 +35,7 @@ struct ck_barrier_combining_queue { struct ck_barrier_combining_group *tail; }; -CK_CC_INLINE static struct ck_barrier_combining_group * +static struct ck_barrier_combining_group * ck_barrier_combining_queue_dequeue(struct ck_barrier_combining_queue *queue) { struct ck_barrier_combining_group *front = NULL; @@ -48,7 +48,7 @@ ck_barrier_combining_queue_dequeue(struct ck_barrier_c return front; } -CK_CC_INLINE static void +static void ck_barrier_combining_insert(struct ck_barrier_combining_group *parent, struct ck_barrier_combining_group *tnode, struct ck_barrier_combining_group **child) @@ -72,7 +72,7 @@ ck_barrier_combining_insert(struct ck_barrier_combinin * into the barrier's tree. We use a queue to implement this * traversal. */ -CK_CC_INLINE static void +static void ck_barrier_combining_queue_enqueue(struct ck_barrier_combining_queue *queue, struct ck_barrier_combining_group *node_value) { @@ -185,10 +185,10 @@ ck_barrier_combining_aux(struct ck_barrier_combining * ck_pr_fence_store(); ck_pr_store_uint(&tnode->sense, ~tnode->sense); } else { - ck_pr_fence_memory(); while (sense != ck_pr_load_uint(&tnode->sense)) ck_pr_stall(); } + ck_pr_fence_memory(); return; } From owner-svn-src-vendor@freebsd.org Thu Aug 9 12:09:36 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA4B7106384E; Thu, 9 Aug 2018 12:09:36 +0000 (UTC) (envelope-from cognet@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 8FB588F7FF; Thu, 9 Aug 2018 12:09:36 +0000 (UTC) (envelope-from cognet@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 5339A192AC; Thu, 9 Aug 2018 12:09:36 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w79C9aAf091518; Thu, 9 Aug 2018 12:09:36 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w79C9avb091517; Thu, 9 Aug 2018 12:09:36 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201808091209.w79C9avb091517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Thu, 9 Aug 2018 12:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337532 - vendor-sys/ck/20180809 X-SVN-Group: vendor-sys X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: vendor-sys/ck/20180809 X-SVN-Commit-Revision: 337532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 12:09:37 -0000 Author: cognet Date: Thu Aug 9 12:09:35 2018 New Revision: 337532 URL: https://svnweb.freebsd.org/changeset/base/337532 Log: Tag CK after import of commit 08813496570879fbcc2adcdd9ddc0a054361bfde Added: vendor-sys/ck/20180809/ - copied from r337531, vendor-sys/ck/dist/ From owner-svn-src-vendor@freebsd.org Fri Aug 10 16:34:29 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BCBA106FB93; Fri, 10 Aug 2018 16:34:29 +0000 (UTC) (envelope-from jkim@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 2E4E3720BA; Fri, 10 Aug 2018 16:34:29 +0000 (UTC) (envelope-from jkim@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 103AB2A37; Fri, 10 Aug 2018 16:34:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7AGYS0x078358; Fri, 10 Aug 2018 16:34:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7AGYO4Q078334; Fri, 10 Aug 2018 16:34:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201808101634.w7AGYO4Q078334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 10 Aug 2018 16:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337581 - in vendor-sys/acpica/dist: . source/components/debugger source/components/dispatcher source/components/hardware source/components/namespace source/components/parser source/com... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/components/debugger source/components/dispatcher source/components/hardware source/components/namespace source/components/parser source/components/tables source/com... X-SVN-Commit-Revision: 337581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 16:34:30 -0000 Author: jkim Date: Fri Aug 10 16:34:24 2018 New Revision: 337581 URL: https://svnweb.freebsd.org/changeset/base/337581 Log: Import ACPICA 20180810. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/changes.txt Fri Aug 10 16:34:24 2018 (r337581) @@ -1,4 +1,51 @@ ---------------------------------------- +10 August 2018. Summary of changes for version 20180810: + + +1) ACPICA kernel-resident subsystem: + +Initial ACPI table loading: Attempt to continue loading ACPI tables +regardless of malformed AML. Since migrating table initialization to the +new module-level code support, the AML interpreter rejected tables upon +any ACPI error encountered during table load. This is a problem because +non-serious ACPI errors during table load do not necessarily mean that +the entire definition block (DSDT or SSDT) is invalid. This change +improves the table loading by ignoring some types of errors that can be +generated by incorrect AML. This can range from object type errors, scope +errors, and index errors. + +Suspend/Resume support: Update to stop unconditionally clearing ACPI IRQs +during suspend/resume. The status of ACPI events is no longer cleared +when entering the ACPI S5 system state (power off) which caused some +systems to power up immediately after turning off power in certain +situations. This was a functional regression. It was fixed by clearing +the status of all ACPI events again when entering S5 (for system-wide +suspend or hibernation the clearing of the status of all events is not +desirable, as it might cause the kernel to miss wakeup events sometimes). +Rafael Wysocki. + + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Enhanced the -fi option (Namespace initialization file). Field +elements listed in the initialization file were previously initialized +after the table load and before executing module-level code blocks. +Recent changes in the module-level code support means that the table load +becomes a large control method execution. If fields are used within +module-level code and we are executing with the -fi option, the +initialization values were used to initialize the namespace object(s) +only after the table was finished loading. This change Provides an early +initialization of objects specified in the initialization file so that +field unit values are populated during the table load (not after the +load). + +AcpiExec: Fixed a small memory leak regression that could result in +warnings during exit of the utility. These warnings were similar to +these: + 0002D690 Length 0x0006 nsnames-0502 [Not a Descriptor - too small] + 0002CD70 Length 0x002C utcache-0453 [Operand] Integer RefCount 0x0001 + +---------------------------------------- 29 June 2018. Summary of changes for version 20180629: Modified: vendor-sys/acpica/dist/source/components/debugger/dbinput.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbinput.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/debugger/dbinput.c Fri Aug 10 16:34:24 2018 (r337581) @@ -969,7 +969,11 @@ AcpiDbCommandDispatch ( case CMD_DISASSEMBLE: case CMD_DISASM: +#ifdef ACPI_DISASSEMBLER (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]); +#else + AcpiOsPrintf ("The AML Disassembler is not configured/present\n"); +#endif break; case CMD_DUMP: @@ -1083,7 +1087,11 @@ AcpiDbCommandDispatch ( case CMD_LIST: - AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op); +#ifdef ACPI_DISASSEMBLER + AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);; +#else + AcpiOsPrintf ("The AML Disassembler is not configured/present\n"); +#endif break; case CMD_LOCKS: Modified: vendor-sys/acpica/dist/source/components/debugger/dbmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbmethod.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/debugger/dbmethod.c Fri Aug 10 16:34:24 2018 (r337581) @@ -393,6 +393,7 @@ Cleanup: } +#ifdef ACPI_DISASSEMBLER /******************************************************************************* * * FUNCTION: AcpiDbDisassembleAml @@ -426,9 +427,7 @@ AcpiDbDisassembleAml ( NumStatements = strtoul (Statements, NULL, 0); } -#ifdef ACPI_DISASSEMBLER AcpiDmDisassemble (NULL, Op, NumStatements); -#endif } @@ -511,8 +510,6 @@ AcpiDbDisassembleMethod ( WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE; Status = AcpiPsParseAml (WalkState); - -#ifdef ACPI_DISASSEMBLER (void) AcpiDmParseDeferredOps (Op); /* Now we can disassemble the method */ @@ -520,7 +517,6 @@ AcpiDbDisassembleMethod ( AcpiGbl_DmOpt_Verbose = FALSE; AcpiDmDisassemble (NULL, Op, 0); AcpiGbl_DmOpt_Verbose = TRUE; -#endif AcpiPsDeleteParseTree (Op); @@ -531,6 +527,7 @@ AcpiDbDisassembleMethod ( AcpiUtReleaseOwnerId (&ObjDesc->Method.OwnerId); return (AE_OK); } +#endif /******************************************************************************* Modified: vendor-sys/acpica/dist/source/components/debugger/dbxface.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbxface.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/debugger/dbxface.c Fri Aug 10 16:34:24 2018 (r337581) @@ -154,6 +154,7 @@ #include "amlcode.h" #include "acdebug.h" #include "acinterp.h" +#include "acparser.h" #define _COMPONENT ACPI_CA_DEBUGGER @@ -435,10 +436,17 @@ AcpiDbSingleStep ( } } - /* Now we can display it */ + /* Now we can disassemble and display it */ #ifdef ACPI_DISASSEMBLER AcpiDmDisassemble (WalkState, DisplayOp, ACPI_UINT32_MAX); +#else + /* + * The AML Disassembler is not configured - at least we can + * display the opcode value and name + */ + AcpiOsPrintf ("AML Opcode: %4.4X %s\n", Op->Common.AmlOpcode, + AcpiPsGetOpcodeName (Op->Common.AmlOpcode)); #endif if ((Op->Common.AmlOpcode == AML_IF_OP) || Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c Fri Aug 10 16:34:24 2018 (r337581) @@ -157,7 +157,11 @@ #include "acnamesp.h" #include "acparser.h" +#ifdef ACPI_EXEC_APP +#include "aecommon.h" +#endif + #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dsfield") @@ -430,7 +434,14 @@ AcpiDsGetFieldNames ( UINT64 Position; ACPI_PARSE_OBJECT *Child; +#ifdef ACPI_EXEC_APP + UINT64 Value = 0; + ACPI_OPERAND_OBJECT *ResultDesc; + ACPI_OPERAND_OBJECT *ObjDesc; + char *NamePath; +#endif + ACPI_FUNCTION_TRACE_PTR (DsGetFieldNames, Info); @@ -564,6 +575,18 @@ AcpiDsGetFieldNames ( { return_ACPI_STATUS (Status); } +#ifdef ACPI_EXEC_APP + NamePath = AcpiNsGetExternalPathname (Info->FieldNode); + ObjDesc = AcpiUtCreateIntegerObject (Value); + if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value))) + { + AcpiExWriteDataToField (ObjDesc, + AcpiNsGetAttachedObject (Info->FieldNode), + &ResultDesc); + } + AcpiUtRemoveReference (ObjDesc); + ACPI_FREE (NamePath); +#endif } } @@ -756,6 +779,9 @@ AcpiDsInitFieldObjects ( Flags |= ACPI_NS_TEMPORARY; } +#ifdef ACPI_EXEC_APP + Flags |= ACPI_NS_OVERRIDE_IF_FOUND; +#endif /* * Walk the list of entries in the FieldList * Note: FieldList can be of zero length. In this case, Arg will be NULL. Modified: vendor-sys/acpica/dist/source/components/hardware/hwregs.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwregs.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/hardware/hwregs.c Fri Aug 10 16:34:24 2018 (r337581) @@ -724,13 +724,20 @@ AcpiHwRegisterRead ( case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPm2ControlBlock); - Value = (UINT32) Value64; + if (ACPI_SUCCESS (Status)) + { + Value = (UINT32) Value64; + } break; case ACPI_REGISTER_PM_TIMER: /* 32-bit access */ Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPmTimerBlock); - Value = (UINT32) Value64; + if (ACPI_SUCCESS (Status)) + { + Value = (UINT32) Value64; + } + break; case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */ Modified: vendor-sys/acpica/dist/source/components/hardware/hwsleep.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwsleep.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/hardware/hwsleep.c Fri Aug 10 16:34:24 2018 (r337581) @@ -198,16 +198,27 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* - * 1) Disable all GPEs - * 2) Enable all wakeup GPEs - */ + /* Disable all GPEs */ + Status = AcpiHwDisableAllGpes (); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } + /* + * If the target sleep state is S5, clear all GPEs and fixed events too + */ + if (SleepState == ACPI_STATE_S5) + { + Status = AcpiHwClearAcpiStatus(); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + } AcpiGbl_SystemAwakeAndRunning = FALSE; + + /* Enable all wakeup GPEs */ Status = AcpiHwEnableAllWakeupGpes (); if (ACPI_FAILURE (Status)) Modified: vendor-sys/acpica/dist/source/components/namespace/nsaccess.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsaccess.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/namespace/nsaccess.c Fri Aug 10 16:34:24 2018 (r337581) @@ -724,6 +724,15 @@ AcpiNsLookup ( CurrentNode)); } +#ifdef ACPI_EXEC_APP + if ((Status == AE_ALREADY_EXISTS) && + (ThisNode->Flags & ANOBJ_NODE_EARLY_INIT)) + { + ThisNode->Flags &= ~ANOBJ_NODE_EARLY_INIT; + Status = AE_OK; + } +#endif + #ifdef ACPI_ASL_COMPILER /* * If this ACPI name already exists within the namespace as an @@ -844,6 +853,13 @@ AcpiNsLookup ( } } } + +#ifdef ACPI_EXEC_APP + if (Flags & ACPI_NS_EARLY_INIT) + { + ThisNode->Flags |= ANOBJ_NODE_EARLY_INIT; + } +#endif *ReturnNode = ThisNode; return_ACPI_STATUS (AE_OK); Modified: vendor-sys/acpica/dist/source/components/parser/psloop.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psloop.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/parser/psloop.c Fri Aug 10 16:34:24 2018 (r337581) @@ -164,6 +164,7 @@ #include "acdispat.h" #include "amlcode.h" #include "acconvert.h" +#include "acnamesp.h" #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME ("psloop") @@ -645,6 +646,18 @@ AcpiPsParseLoop ( Status = AcpiPsCreateOp (WalkState, AmlOpStart, &Op); if (ACPI_FAILURE (Status)) { + /* + * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by + * executing it as a control method. However, if we encounter + * an error while loading the table, we need to keep trying to + * load the table rather than aborting the table load. Set the + * status to AE_OK to proceed with the table load. + */ + if ((WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) && + Status == AE_ALREADY_EXISTS) + { + Status = AE_OK; + } if (Status == AE_CTRL_PARSE_CONTINUE) { continue; @@ -665,18 +678,20 @@ AcpiPsParseLoop ( { return_ACPI_STATUS (Status); } - if (WalkState->Opcode == AML_SCOPE_OP) + if (AcpiNsOpensScope ( + AcpiPsGetOpcodeInfo (WalkState->Opcode)->ObjectType)) { /* - * If the scope op fails to parse, skip the body of the - * scope op because the parse failure indicates that the - * device may not exist. + * If the scope/device op fails to parse, skip the body of + * the scope op because the parse failure indicates that + * the device may not exist. */ + ACPI_ERROR ((AE_INFO, "Skip parsing opcode %s", + AcpiPsGetOpcodeName (WalkState->Opcode))); WalkState->ParserState.Aml = WalkState->Aml + 1; WalkState->ParserState.Aml = AcpiPsGetNextPackageEnd(&WalkState->ParserState); WalkState->Aml = WalkState->ParserState.Aml; - ACPI_ERROR ((AE_INFO, "Skipping Scope block")); } continue; @@ -832,6 +847,22 @@ AcpiPsParseLoop ( Status = AcpiPsNextParseState (WalkState, Op, Status); if (Status == AE_CTRL_PENDING) { + Status = AE_OK; + } + else if ((WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) && + (ACPI_AML_EXCEPTION(Status) || Status == AE_ALREADY_EXISTS || + Status == AE_NOT_FOUND)) + { + /* + * ACPI_PARSE_MODULE_LEVEL flag means that we are currently + * loading a table by executing it as a control method. + * However, if we encounter an error while loading the table, + * we need to keep trying to load the table rather than + * aborting the table load (setting the status to AE_OK + * continues the table load). If we get a failure at this + * point, it means that the dispatcher got an error while + * trying to execute the Op. + */ Status = AE_OK; } } Modified: vendor-sys/acpica/dist/source/components/tables/tbdata.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbdata.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/tables/tbdata.c Fri Aug 10 16:34:24 2018 (r337581) @@ -711,9 +711,9 @@ AcpiTbVerifyTempTable ( { if (Status != AE_CTRL_TERMINATE) { - ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, + ACPI_EXCEPTION ((AE_INFO, Status, "%4.4s 0x%8.8X%8.8X" - " Table is duplicated", + " Table is already loaded", AcpiUtValidNameseg (TableDesc->Signature.Ascii) ? TableDesc->Signature.Ascii : "????", ACPI_FORMAT_UINT64 (TableDesc->Address))); Modified: vendor-sys/acpica/dist/source/components/utilities/utdelete.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utdelete.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/utilities/utdelete.c Fri Aug 10 16:34:24 2018 (r337581) @@ -520,6 +520,7 @@ AcpiUtUpdateRefCount ( UINT16 OriginalCount; UINT16 NewCount = 0; ACPI_CPU_FLAGS LockFlags; + char *Message; ACPI_FUNCTION_NAME (UtUpdateRefCount); @@ -560,6 +561,7 @@ AcpiUtUpdateRefCount ( "Obj %p Type %.2X [%s] Refs %.2X [Incremented]\n", Object, Object->Common.Type, AcpiUtGetObjectTypeName (Object), NewCount)); + Message = "Incremement"; break; case REF_DECREMENT: @@ -591,6 +593,7 @@ AcpiUtUpdateRefCount ( { AcpiUtDeleteInternalObj (Object); } + Message = "Decrement"; break; default: @@ -608,8 +611,8 @@ AcpiUtUpdateRefCount ( if (NewCount > ACPI_MAX_REFERENCE_COUNT) { ACPI_WARNING ((AE_INFO, - "Large Reference Count (0x%X) in object %p, Type=0x%.2X", - NewCount, Object, Object->Common.Type)); + "Large Reference Count (0x%X) in object %p, Type=0x%.2X Operation=%s", + NewCount, Object, Object->Common.Type, Message)); } } Modified: vendor-sys/acpica/dist/source/components/utilities/uterror.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/uterror.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/utilities/uterror.c Fri Aug 10 16:34:24 2018 (r337581) @@ -352,19 +352,19 @@ AcpiUtPrefixedNamespaceError ( { case AE_ALREADY_EXISTS: - AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR); + AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); Message = "Failure creating"; break; case AE_NOT_FOUND: - AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR); + AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); Message = "Could not resolve"; break; default: - AcpiOsPrintf ("\n" ACPI_MSG_ERROR); + AcpiOsPrintf (ACPI_MSG_ERROR); Message = "Failure resolving"; break; } Modified: vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c Fri Aug 10 16:34:24 2018 (r337581) @@ -419,15 +419,39 @@ BOOLEAN AcpiUtDetectHexPrefix ( char **String) { + char *InitialPosition = *String; + AcpiUtRemoveHexPrefix (String); + if (*String != InitialPosition) + { + return (TRUE); /* String is past leading 0x */ + } + + return (FALSE); /* Not a hex string */ +} + + +/******************************************************************************* + * + * FUNCTION: AcpiUtRemoveHexPrefix + * + * PARAMETERS: String - Pointer to input ASCII string + * + * RETURN: none + * + * DESCRIPTION: Remove a hex "0x" prefix + * + ******************************************************************************/ + +void +AcpiUtRemoveHexPrefix ( + char **String) +{ if ((**String == ACPI_ASCII_ZERO) && (tolower ((int) *(*String + 1)) == 'x')) { *String += 2; /* Go past the leading 0x */ - return (TRUE); } - - return (FALSE); /* Not a hex string */ } Modified: vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c Fri Aug 10 16:34:24 2018 (r337581) @@ -383,7 +383,7 @@ AcpiUtImplicitStrtoul64 ( * implicit conversions, and the "0x" prefix is "not allowed". * However, allow a "0x" prefix as an ACPI extension. */ - AcpiUtDetectHexPrefix (&String); + AcpiUtRemoveHexPrefix (&String); if (!AcpiUtRemoveLeadingZeros (&String)) { Modified: vendor-sys/acpica/dist/source/include/acconfig.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acconfig.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/acconfig.h Fri Aug 10 16:34:24 2018 (r337581) @@ -233,7 +233,7 @@ /* Maximum object reference count (detects object deletion issues) */ -#define ACPI_MAX_REFERENCE_COUNT 0x800 +#define ACPI_MAX_REFERENCE_COUNT 0x4000 /* Default page size for use in mapping memory for operation regions */ Modified: vendor-sys/acpica/dist/source/include/acexcep.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acexcep.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/acexcep.h Fri Aug 10 16:34:24 2018 (r337581) @@ -204,6 +204,13 @@ typedef struct acpi_exception_info #define AE_OK (ACPI_STATUS) 0x0000 +#define ACPI_ENV_EXCEPTION(Status) (Status & AE_CODE_ENVIRONMENTAL) +#define ACPI_AML_EXCEPTION(Status) (Status & AE_CODE_AML) +#define ACPI_PROG_EXCEPTION(Status) (Status & AE_CODE_PROGRAMMER) +#define ACPI_TABLE_EXCEPTION(Status) (Status & AE_CODE_ACPI_TABLES) +#define ACPI_CNTL_EXCEPTION(Status) (Status & AE_CODE_CONTROL) + + /* * Environmental exceptions */ Modified: vendor-sys/acpica/dist/source/include/aclocal.h ============================================================================== --- vendor-sys/acpica/dist/source/include/aclocal.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/aclocal.h Fri Aug 10 16:34:24 2018 (r337581) @@ -327,6 +327,7 @@ typedef struct acpi_namespace_node #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */ +#define ANOBJ_NODE_EARLY_INIT 0x80 /* AcpiExec only: Node was create via init file (-fi) */ #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ Modified: vendor-sys/acpica/dist/source/include/acnamesp.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acnamesp.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/acnamesp.h Fri Aug 10 16:34:24 2018 (r337581) @@ -168,14 +168,15 @@ /* Flags for AcpiNsLookup, AcpiNsSearchAndEnter */ #define ACPI_NS_NO_UPSEARCH 0 -#define ACPI_NS_SEARCH_PARENT 0x01 -#define ACPI_NS_DONT_OPEN_SCOPE 0x02 -#define ACPI_NS_NO_PEER_SEARCH 0x04 -#define ACPI_NS_ERROR_IF_FOUND 0x08 -#define ACPI_NS_PREFIX_IS_SCOPE 0x10 -#define ACPI_NS_EXTERNAL 0x20 -#define ACPI_NS_TEMPORARY 0x40 -#define ACPI_NS_OVERRIDE_IF_FOUND 0x80 +#define ACPI_NS_SEARCH_PARENT 0x0001 +#define ACPI_NS_DONT_OPEN_SCOPE 0x0002 +#define ACPI_NS_NO_PEER_SEARCH 0x0004 +#define ACPI_NS_ERROR_IF_FOUND 0x0008 +#define ACPI_NS_PREFIX_IS_SCOPE 0x0010 +#define ACPI_NS_EXTERNAL 0x0020 +#define ACPI_NS_TEMPORARY 0x0040 +#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080 +#define ACPI_NS_EARLY_INIT 0x0100 /* Flags for AcpiNsWalkNamespace */ Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/acpixf.h Fri Aug 10 16:34:24 2018 (r337581) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180629 +#define ACPI_CA_VERSION 0x20180810 #include "acconfig.h" #include "actypes.h" Modified: vendor-sys/acpica/dist/source/include/acutils.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acutils.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/include/acutils.h Fri Aug 10 16:34:24 2018 (r337581) @@ -362,6 +362,10 @@ BOOLEAN AcpiUtDetectHexPrefix ( char **String); +void +AcpiUtRemoveHexPrefix ( + char **String); + BOOLEAN AcpiUtDetectOctalPrefix ( char **String); Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h Fri Aug 10 16:34:24 2018 (r337581) @@ -189,11 +189,22 @@ typedef struct ae_debug_regions } AE_DEBUG_REGIONS; +/* + * Init file entry + */ +typedef struct init_file_entry +{ + char *Name; + UINT64 Value; +} INIT_FILE_ENTRY; + extern BOOLEAN AcpiGbl_UseLocalFaultHandler; extern BOOLEAN AcpiGbl_VerboseHandlers; extern BOOLEAN AcpiGbl_IgnoreErrors; extern BOOLEAN AcpiGbl_AbortLoopOnTimeout; extern UINT8 AcpiGbl_RegionFillValue; +extern INIT_FILE_ENTRY *AcpiGbl_InitEntries; +extern UINT32 AcpiGbl_InitFileLineCount; extern UINT8 AcpiGbl_UseHwReducedFadt; extern BOOLEAN AcpiGbl_DisplayRegionAccess; extern BOOLEAN AcpiGbl_DoInterfaceTests; @@ -331,12 +342,17 @@ AeOpenInitializationFile ( char *Filename); void -AeDoObjectOverrides ( +AeProcessInitFile ( void); ACPI_STATUS AeSetupConfiguration ( void *RegionAddr); + +ACPI_STATUS +AeLookupInitFileEntry ( + char *Pathname, + UINT64 *Value); /* aeexec */ Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c Fri Aug 10 16:34:24 2018 (r337581) @@ -159,10 +159,8 @@ /* Local prototypes */ static void -AeDoOneOverride ( - char *Pathname, - char *ValueString, - ACPI_OPERAND_OBJECT *ObjDesc, +AeEnterInitFileEntry ( + INIT_FILE_ENTRY InitEntry, ACPI_WALK_STATE *WalkState); @@ -206,13 +204,15 @@ AeOpenInitializationFile ( /****************************************************************************** * - * FUNCTION: AeDoObjectOverrides + * FUNCTION: AeProcessInitFile * * PARAMETERS: None * * RETURN: None * - * DESCRIPTION: Read the initialization file and perform all overrides + * DESCRIPTION: Read the initialization file and perform all namespace + * initializations. AcpiGbl_InitEntries will be used for region + * field initialization. * * NOTE: The format of the file is multiple lines, each of format: * @@ -220,12 +220,13 @@ AeOpenInitializationFile ( *****************************************************************************/ void -AeDoObjectOverrides ( +AeProcessInitFile( void) { - ACPI_OPERAND_OBJECT *ObjDesc; ACPI_WALK_STATE *WalkState; int i; + UINT64 idx; + ACPI_STATUS Status; if (!InitFile) @@ -235,14 +236,19 @@ AeDoObjectOverrides ( /* Create needed objects to be reused for each init entry */ - ObjDesc = AcpiUtCreateIntegerObject (0); WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL); NameBuffer[0] = '\\'; - /* Read the entire file line-by-line */ - while (fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile) != NULL) { + ++AcpiGbl_InitFileLineCount; + } + rewind (InitFile); + + AcpiGbl_InitEntries = + AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount); + for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx) + { if (sscanf (LineBuffer, "%s %s\n", &NameBuffer[1], ValueBuffer) != 2) { @@ -257,7 +263,20 @@ AeDoObjectOverrides ( i = 1; } - AeDoOneOverride (&NameBuffer[i], ValueBuffer, ObjDesc, WalkState); + AcpiGbl_InitEntries[idx].Name = + AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1); + + strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i); + + Status = AcpiUtStrtoul64 (ValueBuffer, &AcpiGbl_InitEntries[idx].Value); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("%s %s\n", ValueBuffer, + AcpiFormatException (Status)); + goto CleanupAndExit; + } + + AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState); } /* Cleanup */ @@ -265,77 +284,97 @@ AeDoObjectOverrides ( CleanupAndExit: fclose (InitFile); AcpiDsDeleteWalkState (WalkState); - AcpiUtRemoveReference (ObjDesc); } /****************************************************************************** * - * FUNCTION: AeDoOneOverride + * FUNCTION: AeInitFileEntry * - * PARAMETERS: Pathname - AML namepath - * ValueString - New integer value to be stored - * ObjDesc - Descriptor with integer override value + * PARAMETERS: InitEntry - Entry of the init file * WalkState - Used for the Store operation * * RETURN: None * - * DESCRIPTION: Perform an override for a single namespace object + * DESCRIPTION: Perform initialization of a single namespace object * + * Note: namespace of objects are limited to integers and region + * fields units of 8 bytes at this time. + * *****************************************************************************/ static void -AeDoOneOverride ( - char *Pathname, - char *ValueString, - ACPI_OPERAND_OBJECT *ObjDesc, +AeEnterInitFileEntry ( + INIT_FILE_ENTRY InitEntry, ACPI_WALK_STATE *WalkState) { - ACPI_HANDLE Handle; + char *Pathname = InitEntry.Name; + UINT64 Value = InitEntry.Value; + ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_NAMESPACE_NODE *NewNode; ACPI_STATUS Status; - UINT64 Value; - AcpiOsPrintf ("Value Override: %s, ", Pathname); - - /* - * Get the namespace node associated with the override - * pathname from the init file. - */ - Status = AcpiGetHandle (NULL, Pathname, &Handle); + AcpiOsPrintf ("Initializing namespace element: %s\n", Pathname); + Status = AcpiNsLookup (NULL, Pathname, ACPI_TYPE_INTEGER, + ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH | + ACPI_NS_EARLY_INIT, NULL, &NewNode); if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ("%s\n", AcpiFormatException (Status)); + ACPI_EXCEPTION ((AE_INFO, Status, + "While creating name from namespace initialization file: %s", + Pathname)); return; } - /* Extract the 64-bit integer */ + ObjDesc = AcpiUtCreateIntegerObject (Value); - Status = AcpiUtStrtoul64 (ValueString, &Value); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("%s %s\n", ValueString, - AcpiFormatException (Status)); - return; - } + AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n", + ACPI_FORMAT_UINT64 (Value)); - ObjDesc->Integer.Value = Value; + /* Store pointer to value descriptor in the Node */ - /* - * At the point this function is called, the namespace is fully - * built and initialized. We can simply store the new object to - * the target node. - */ - AcpiExEnterInterpreter (); - Status = AcpiExStore (ObjDesc, Handle, WalkState); - AcpiExExitInterpreter (); + Status = AcpiNsAttachObject (NewNode, ObjDesc, + ACPI_TYPE_INTEGER); - if (ACPI_FAILURE (Status)) + /* Remove local reference to the object */ + + AcpiUtRemoveReference (ObjDesc); +} + + +/****************************************************************************** + * + * FUNCTION: AeLookupInitFileEntry + * + * PARAMETERS: Pathname - AML namepath in external format + * ValueString - value of the namepath if it exitst + * + * RETURN: None + * + * DESCRIPTION: Search the init file for a particular name and its value. + * + *****************************************************************************/ + +ACPI_STATUS +AeLookupInitFileEntry ( + char *Pathname, + UINT64 *Value) +{ + UINT32 i; + + if (!AcpiGbl_InitEntries) { - AcpiOsPrintf ("%s\n", AcpiFormatException (Status)); - return; + return AE_NOT_FOUND; } - AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n", - ACPI_FORMAT_UINT64 (Value)); + for (i = 0; i < AcpiGbl_InitFileLineCount; ++i) + { + if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname)) + { + *Value = AcpiGbl_InitEntries[i].Value; + return AE_OK; + } + } + return AE_NOT_FOUND; } Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Fri Aug 10 16:34:24 2018 (r337581) @@ -199,6 +199,8 @@ BOOLEAN AcpiGbl_LoadTestTables = F BOOLEAN AcpiGbl_AeLoadOnly = FALSE; static UINT8 AcpiGbl_ExecutionMode = AE_MODE_COMMAND_LOOP; static char BatchBuffer[AE_BUFFER_SIZE]; /* Batch command buffer */ +INIT_FILE_ENTRY *AcpiGbl_InitEntries = NULL; +UINT32 AcpiGbl_InitFileLineCount = 0; #define ACPIEXEC_NAME "AML Execution/Debug Utility" #define AE_SUPPORTED_OPTIONS "?b:d:e:f^ghlm^rt^v^:x:" @@ -677,6 +679,8 @@ main ( signal (SIGSEGV, AeSignalHandler); } + AeProcessInitFile(); + /* The remaining arguments are filenames for ACPI tables */ if (!argv[AcpiGbl_Optind]) @@ -785,12 +789,6 @@ main ( */ AeInstallLateHandlers (); - /* - * This call implements the "initialization file" option for AcpiExec. - * This is the precise point that we want to perform the overrides. - */ - AeDoObjectOverrides (); - /* Finish the ACPICA initialization */ Status = AcpiInitializeObjects (InitFlags); @@ -848,5 +846,6 @@ NormalExit: ErrorExit: (void) AcpiTerminate (); AcDeleteTableList (ListHead); + AcpiOsFree (AcpiGbl_InitEntries); return (ExitCode); } Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c Fri Aug 10 15:35:02 2018 (r337580) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c Fri Aug 10 16:34:24 2018 (r337581) @@ -234,9 +234,9 @@ AeRegionHandler ( SpaceId = RegionObject->Region.SpaceId; ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION, - "Operation Region request on %s at 0x%X\n", + "Operation Region request on %s at 0x%X, BitWidth 0x%X, RegionLength 0x%X\n", AcpiUtGetRegionName (RegionObject->Region.SpaceId), - (UINT32) Address)); + (UINT32) Address, BitWidth, (UINT32) Length)); /* * Region support can be disabled with the -do option. @@ -410,7 +410,7 @@ AeRegionHandler ( if (AcpiGbl_DisplayRegionAccess) { AcpiOsPrintf ("AcpiExec: %s " - "%s: Attr %X Addr %.4X BaseAddr %.4X Len %.2X Width %X BufLen %X", + "%s: Attr %X Addr %.4X BaseAddr %.4X Length %.2X BitWidth %X BufLen %X", AcpiUtGetRegionName (SpaceId), (Function & ACPI_IO_MASK) ? "Write" : "Read ", (UINT32) (Function >> 16), @@ -424,7 +424,7 @@ AeRegionHandler ( Status = AcpiBufferToResource (MyContext->Connection, MyContext->Length, &Resource); - AcpiOsPrintf (" [AccLen %.2X Conn %p]", + AcpiOsPrintf (" [AccessLength %.2X Connnection %p]", MyContext->AccessLength, MyContext->Connection); } AcpiOsPrintf ("\n"); From owner-svn-src-vendor@freebsd.org Fri Aug 10 16:35:05 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2751D106FC49; Fri, 10 Aug 2018 16:35:05 +0000 (UTC) (envelope-from jkim@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 D14767223B; Fri, 10 Aug 2018 16:35:04 +0000 (UTC) (envelope-from jkim@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 9872B2A38; Fri, 10 Aug 2018 16:35:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7AGZ4ne078435; Fri, 10 Aug 2018 16:35:04 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7AGZ4sr078434; Fri, 10 Aug 2018 16:35:04 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201808101635.w7AGZ4sr078434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 10 Aug 2018 16:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337582 - vendor-sys/acpica/20180810 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180810 X-SVN-Commit-Revision: 337582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 16:35:05 -0000 Author: jkim Date: Fri Aug 10 16:35:04 2018 New Revision: 337582 URL: https://svnweb.freebsd.org/changeset/base/337582 Log: Tag ACPICA 20180810. Added: vendor-sys/acpica/20180810/ - copied from r337581, vendor-sys/acpica/dist/ From owner-svn-src-vendor@freebsd.org Fri Aug 10 20:05:53 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEBF610738BE; Fri, 10 Aug 2018 20:05:52 +0000 (UTC) (envelope-from kevans@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 4BF2178909; Fri, 10 Aug 2018 20:05:52 +0000 (UTC) (envelope-from kevans@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 1F99C5095; Fri, 10 Aug 2018 20:05:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7AK5pX8086020; Fri, 10 Aug 2018 20:05:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7AK5fSr085963; Fri, 10 Aug 2018 20:05:41 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808102005.w7AK5fSr085963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Aug 2018 20:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337586 - in vendor/lua/dist: . doc src X-SVN-Group: vendor X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in vendor/lua/dist: . doc src X-SVN-Commit-Revision: 337586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 20:05:53 -0000 Author: kevans Date: Fri Aug 10 20:05:41 2018 New Revision: 337586 URL: https://svnweb.freebsd.org/changeset/base/337586 Log: Import lua 5.3.5 Modified: vendor/lua/dist/README vendor/lua/dist/doc/contents.html vendor/lua/dist/doc/lua.css vendor/lua/dist/doc/manual.html vendor/lua/dist/doc/readme.html vendor/lua/dist/src/Makefile vendor/lua/dist/src/lapi.c vendor/lua/dist/src/lapi.h vendor/lua/dist/src/lauxlib.c vendor/lua/dist/src/lauxlib.h vendor/lua/dist/src/lbaselib.c vendor/lua/dist/src/lbitlib.c vendor/lua/dist/src/lcode.c vendor/lua/dist/src/lcode.h vendor/lua/dist/src/lcorolib.c vendor/lua/dist/src/lctype.c vendor/lua/dist/src/lctype.h vendor/lua/dist/src/ldblib.c vendor/lua/dist/src/ldebug.c vendor/lua/dist/src/ldebug.h vendor/lua/dist/src/ldo.c vendor/lua/dist/src/ldo.h vendor/lua/dist/src/ldump.c vendor/lua/dist/src/lfunc.c vendor/lua/dist/src/lfunc.h vendor/lua/dist/src/lgc.c vendor/lua/dist/src/lgc.h vendor/lua/dist/src/linit.c vendor/lua/dist/src/liolib.c vendor/lua/dist/src/llex.c vendor/lua/dist/src/llex.h vendor/lua/dist/src/llimits.h vendor/lua/dist/src/lmathlib.c vendor/lua/dist/src/lmem.c vendor/lua/dist/src/lmem.h vendor/lua/dist/src/loadlib.c vendor/lua/dist/src/lobject.c vendor/lua/dist/src/lobject.h vendor/lua/dist/src/lopcodes.c vendor/lua/dist/src/lopcodes.h vendor/lua/dist/src/loslib.c vendor/lua/dist/src/lparser.c vendor/lua/dist/src/lparser.h vendor/lua/dist/src/lprefix.h vendor/lua/dist/src/lstate.c vendor/lua/dist/src/lstate.h vendor/lua/dist/src/lstring.c vendor/lua/dist/src/lstring.h vendor/lua/dist/src/lstrlib.c vendor/lua/dist/src/ltable.c vendor/lua/dist/src/ltable.h vendor/lua/dist/src/ltablib.c vendor/lua/dist/src/ltm.c vendor/lua/dist/src/ltm.h vendor/lua/dist/src/lua.c vendor/lua/dist/src/lua.h vendor/lua/dist/src/luac.c vendor/lua/dist/src/luaconf.h vendor/lua/dist/src/lualib.h vendor/lua/dist/src/lundump.c vendor/lua/dist/src/lundump.h vendor/lua/dist/src/lutf8lib.c vendor/lua/dist/src/lvm.c vendor/lua/dist/src/lvm.h vendor/lua/dist/src/lzio.c vendor/lua/dist/src/lzio.h Modified: vendor/lua/dist/README ============================================================================== --- vendor/lua/dist/README Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/README Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ -This is Lua 5.3.4, released on 12 Jan 2017. +This is Lua 5.3.5, released on 26 Jun 2018. For installation instructions, license details, and further information about Lua, see doc/readme.html. Modified: vendor/lua/dist/doc/contents.html ============================================================================== --- vendor/lua/dist/doc/contents.html Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/doc/contents.html Fri Aug 10 20:05:41 2018 (r337586) @@ -32,7 +32,7 @@ For a complete introduction to Lua programming, see th

-Copyright © 2015–2017 Lua.org, PUC-Rio. +Copyright © 2015–2018 Lua.org, PUC-Rio. Freely available under the terms of the Lua license. @@ -609,10 +609,10 @@ Freely available under the terms of the

Modified: vendor/lua/dist/doc/lua.css ============================================================================== --- vendor/lua/dist/doc/lua.css Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/doc/lua.css Fri Aug 10 20:05:41 2018 (r337586) @@ -10,7 +10,7 @@ body { line-height: 1.25 ; margin: 16px auto ; padding: 32px ; - border: solid #a0a0a0 1px ; + border: solid #ccc 1px ; border-radius: 20px ; max-width: 70em ; width: 90% ; @@ -111,36 +111,29 @@ pre.session { border-radius: 8px ; } -td.gutter { - width: 4% ; -} - -table.columns { +table { border: none ; border-spacing: 0 ; border-collapse: collapse ; } +td { + padding: 0 ; + margin: 0 ; +} + +td.gutter { + width: 4% ; +} + table.columns td { vertical-align: top ; - padding: 0 ; padding-bottom: 1em ; text-align: justify ; line-height: 1.25 ; } -p.logos a:link:hover, p.logos a:visited:hover { - background-color: inherit ; -} - -table.book { - border: none ; - border-spacing: 0 ; - border-collapse: collapse ; -} - table.book td { - padding: 0 ; vertical-align: top ; } @@ -157,6 +150,10 @@ table.book span { text-align: left ; display: block ; margin-top: 0.25em ; +} + +p.logos a:link:hover, p.logos a:visited:hover { + background-color: inherit ; } img { Modified: vendor/lua/dist/doc/manual.html ============================================================================== --- vendor/lua/dist/doc/manual.html Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/doc/manual.html Fri Aug 10 20:05:41 2018 (r337586) @@ -19,7 +19,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo,

-Copyright © 2015–2017 Lua.org, PUC-Rio. +Copyright © 2015–2018 Lua.org, PUC-Rio. Freely available under the terms of the Lua license. @@ -35,7 +35,7 @@ Freely available under the terms of the

- + @@ -203,8 +203,8 @@ even those that do not support threads natively.

The type table implements associative arrays, -that is, arrays that can be indexed not only with numbers, -but with any Lua value except nil and NaN. +that is, arrays that can have as indices not only numbers, +but any Lua value except nil and NaN. (Not a Number is a special value used to represent undefined or unrepresentable numerical results, such as 0/0.) Tables can be heterogeneous; @@ -400,6 +400,8 @@ with the event name prefixed by two underscores; the corresponding values are called metamethods. In the previous example, the key is "__add" and the metamethod is the function that performs the addition. +Unless stated otherwise, +metamethods should be function values.

@@ -597,7 +599,7 @@ it is also slower than a real __le metame

  • __index: -The indexing access table[key]. +The indexing access operation table[key]. This event happens when table is not a table or when key is not present in table. The metamethod is looked up in table. @@ -1276,13 +1278,8 @@ Square brackets are used to index a table:
     	var ::= prefixexp ‘[’ exp ‘]

    -The meaning of accesses to table fields can be changed via metatables. -An access to an indexed variable t[i] is equivalent to -a call gettable_event(t,i). -(See §2.4 for a complete description of the -gettable_event function. -This function is not defined or callable in Lua. -We use it here only for explanatory purposes.) +The meaning of accesses to table fields can be changed via metatables +(see §2.4).

    @@ -1477,25 +1474,20 @@ cyclically permutes the values of x, -The meaning of assignments to global variables -and table fields can be changed via metatables. -An assignment to an indexed variable t[i] = val is equivalent to -settable_event(t,i,val). -(See §2.4 for a complete description of the -settable_event function. -This function is not defined or callable in Lua. -We use it here only for explanatory purposes.) - - -

    An assignment to a global name x = val is equivalent to the assignment _ENV.x = val (see §2.2). +

    +The meaning of assignments to table fields and +global variables (which are actually table fields, too) +can be changed via metatables (see §2.4). + +

    3.3.4 – Control Structures

    The control structures if, while, and repeat have the usual meaning and @@ -1831,17 +1823,17 @@ Here are some examples: g(f(), x) -- f() is adjusted to 1 result g(x, f()) -- g gets x plus all results from f() a,b,c = f(), x -- f() is adjusted to 1 result (c gets nil) - a,b = ... -- a gets the first vararg parameter, b gets + a,b = ... -- a gets the first vararg argument, b gets -- the second (both a and b can get nil if there - -- is no corresponding vararg parameter) + -- is no corresponding vararg argument) a,b,c = x, f() -- f() is adjusted to 2 results a,b,c = f() -- f() is adjusted to 3 results return f() -- returns all results from f() - return ... -- returns all received vararg parameters + return ... -- returns all received vararg arguments return x,y,f() -- returns x, y, and all results from f() {f()} -- creates a list with all results from f() - {...} -- creates a list with all vararg parameters + {...} -- creates a list with all vararg arguments {f(), nil} -- f() is adjusted to 1 result @@ -2039,9 +2031,12 @@ two objects are considered equal only if they are the Every time you create a new object (a table, userdata, or thread), this new object is different from any previously existing object. -Closures with the same reference are always equal. +A closure is always equal to itself. Closures with any detectable difference (different behavior, different definition) are always different. +Closures created at different times but with no detectable differences +may be classified as equal or not +(depending on internal caching details).

    @@ -2303,7 +2298,7 @@ If the value of prefixexp has type function, then this function is called with the given arguments. Otherwise, the prefixexp "call" metamethod is called, -having as first parameter the value of prefixexp, +having as first argument the value of prefixexp, followed by the original call arguments (see §2.4). @@ -2881,7 +2876,7 @@ it can do whatever it wants on that Lua state, as it should be already protected. However, when C code operates on other Lua states -(e.g., a Lua parameter to the function, +(e.g., a Lua argument to the function, a Lua state stored in the registry, or the result of lua_newthread), it should use them only in API calls that cannot raise errors. @@ -3370,7 +3365,7 @@ it is left unchanged. Destroys all objects in the given Lua state (calling the corresponding garbage-collection metamethods, if any) and frees all dynamic memory used by this state. -On several platforms, you may not need to call this function, +In several platforms, you may not need to call this function, because all resources are naturally released when the host program ends. On the other hand, long-running programs that create multiple states, such as daemons or web servers, @@ -5584,7 +5579,7 @@ given as argument to a hook (see <

    -To get information about a function you push it onto the stack +To get information about a function, you push it onto the stack and start the what string with the character '>'. (In that case, lua_getinfo pops the function from the top of the stack.) @@ -6462,7 +6457,7 @@ file-related functions in the standard library

    Pushes onto the stack the field e from the metatable -of the object at index obj and returns the type of pushed value. +of the object at index obj and returns the type of the pushed value. If the object does not have a metatable, or if the metatable does not have this field, pushes nothing and returns LUA_TNIL. @@ -6749,7 +6744,7 @@ In words, if the argument arg is nil or a the macro results in the default dflt. Otherwise, it results in the result of calling func with the state L and the argument index arg as -parameters. +arguments. Note that it evaluates the expression dflt only if needed. @@ -8680,7 +8675,7 @@ the lowercase letters plus the '-' charac

    You can put a closing square bracket in a set by positioning it as the first character in the set. -You can put an hyphen in a set +You can put a hyphen in a set by positioning it as the first or the last character in the set. (You can also use an escape for both cases.) @@ -9082,8 +9077,8 @@ Returns the destination table a2.

    -Returns a new table with all parameters stored into keys 1, 2, etc. -and with a field "n" with the total number of parameters. +Returns a new table with all arguments stored into keys 1, 2, etc. +and with a field "n" with the total number of arguments. Note that the resulting table may not be a sequence. @@ -9215,7 +9210,7 @@ Returns the arc sine of x (in radians).

    Returns the arc tangent of y/x (in radians), -but uses the signs of both parameters to find the +but uses the signs of both arguments to find the quadrant of the result. (It also handles correctly the case of x being zero.) @@ -9516,7 +9511,7 @@ all I/O functions return nil on failure (plus an error message as a second result and a system-dependent error code as a third result) and some value different from nil on success. -On non-POSIX systems, +In non-POSIX systems, the computation of the error message and error code in case of errors may be not thread safe, @@ -9553,7 +9548,7 @@ When called with a file name, it opens the named file and sets its handle as the default input file. When called with a file handle, it simply sets this file handle as the default input file. -When called without parameters, +When called without arguments, it returns the current default input file. @@ -9580,7 +9575,7 @@ it returns no values (to finish the loop) and automati The call io.lines() (with no file name) is equivalent to io.input():lines("*l"); that is, it iterates over the lines of the default input file. -In this case it does not close the file when the loop ends. +In this case, the iterator does not close the file when the loop ends.

    @@ -9963,7 +9958,7 @@ the host system and on the current locale.

    -On non-POSIX systems, +In non-POSIX systems, this function may be not thread safe because of its reliance on C function gmtime and C function localtime. @@ -10163,7 +10158,7 @@ and explicitly removed when no longer needed.

    -On POSIX systems, +In POSIX systems, this function also creates a file with that name, to avoid security risks. (Someone else might create the file with wrong permissions @@ -10301,8 +10296,8 @@ The first parameter or local variable has index 1 following the order that they are declared in the code, counting only the variables that are active in the current scope of the function. -Negative indices refer to vararg parameters; --1 is the first vararg parameter. +Negative indices refer to vararg arguments; +-1 is the first vararg argument. The function returns nil if there is no variable with the given index, and raises an error when called with a level out of range. (You can call debug.getinfo to check whether the level is valid.) @@ -10400,7 +10395,7 @@ When called without arguments,

    -When the hook is called, its first parameter is a string +When the hook is called, its first argument is a string describing the event that has triggered its call: "call" (or "tail call"), "return", @@ -10551,7 +10546,8 @@ The options are:

    • -e stat: executes string stat;
    • -
    • -l mod: "requires" mod;
    • +
    • -l mod: "requires" mod and assigns the + result to global @mod;
    • -i: enters interactive mode after running script;
    • -v: prints version information;
    • -E: ignores environment variables;
    • @@ -10629,7 +10625,7 @@ For instance, the call

      will print "-e". If there is a script, -the script is called with parameters +the script is called with arguments arg[1], ···, arg[#arg]. (Like all chunks in Lua, the script is compiled as a vararg function.) @@ -10815,7 +10811,7 @@ The following functions were deprecated in the mathema frexp, and ldexp. You can replace math.pow(x,y) with x^y; you can replace math.atan2 with math.atan, -which now accepts one or two parameters; +which now accepts one or two arguments; you can replace math.ldexp(x,exp) with x * 2.0^exp. For the other operations, you can either use an external library or @@ -10850,7 +10846,7 @@ of the first result.)

      • -Continuation functions now receive as parameters what they needed +Continuation functions now receive as arguments what they needed to get through lua_getctx, so lua_getctx has been removed. Adapt your code accordingly. @@ -10973,12 +10969,13 @@ and LiteralString, see §3.1.) + Modified: vendor/lua/dist/doc/readme.html ============================================================================== --- vendor/lua/dist/doc/readme.html Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/doc/readme.html Fri Aug 10 20:05:41 2018 (r337586) @@ -107,7 +107,7 @@ Here are the details.
        1. Open a terminal window and move to -the top-level directory, which is named lua-5.3.x. +the top-level directory, which is named lua-5.3.5. The Makefile there controls both the build process and the installation process.

        2. @@ -355,10 +355,10 @@ THE SOFTWARE. Modified: vendor/lua/dist/src/Makefile ============================================================================== --- vendor/lua/dist/src/Makefile Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/Makefile Fri Aug 10 20:05:41 2018 (r337586) @@ -102,7 +102,7 @@ c89: freebsd: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc" generic: $(ALL) @@ -110,7 +110,7 @@ linux: $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" macosx: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" mingw: $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ Modified: vendor/lua/dist/src/lapi.c ============================================================================== --- vendor/lua/dist/src/lapi.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lapi.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.259 2016/02/29 14:27:14 roberto Exp $ +** $Id: lapi.c,v 2.259.1.2 2017/12/06 18:35:12 roberto Exp $ ** Lua API ** See Copyright Notice in lua.h */ @@ -533,6 +533,7 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunc lua_lock(L); if (n == 0) { setfvalue(L->top, fn); + api_incr_top(L); } else { CClosure *cl; @@ -546,9 +547,9 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunc /* does not need barrier because closure is white */ } setclCvalue(L, L->top, cl); + api_incr_top(L); + luaC_checkGC(L); } - api_incr_top(L); - luaC_checkGC(L); lua_unlock(L); } Modified: vendor/lua/dist/src/lapi.h ============================================================================== --- vendor/lua/dist/src/lapi.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lapi.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ +** $Id: lapi.h,v 2.9.1.1 2017/04/19 17:20:42 roberto Exp $ ** Auxiliary functions from Lua API ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lauxlib.c ============================================================================== --- vendor/lua/dist/src/lauxlib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lauxlib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.289 2016/12/20 18:37:00 roberto Exp $ +** $Id: lauxlib.c,v 1.289.1.1 2017/04/19 17:20:42 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lauxlib.h ============================================================================== --- vendor/lua/dist/src/lauxlib.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lauxlib.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.131 2016/12/06 14:54:31 roberto Exp $ +** $Id: lauxlib.h,v 1.131.1.1 2017/04/19 17:20:42 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lbaselib.c ============================================================================== --- vendor/lua/dist/src/lbaselib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lbaselib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.314 2016/09/05 19:06:34 roberto Exp $ +** $Id: lbaselib.c,v 1.314.1.1 2017/04/19 17:39:34 roberto Exp $ ** Basic library ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lbitlib.c ============================================================================== --- vendor/lua/dist/src/lbitlib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lbitlib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lbitlib.c,v 1.30 2015/11/11 19:08:09 roberto Exp $ +** $Id: lbitlib.c,v 1.30.1.1 2017/04/19 17:20:42 roberto Exp $ ** Standard library for bitwise operations ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lcode.c ============================================================================== --- vendor/lua/dist/src/lcode.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lcode.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.112 2016/12/22 13:08:50 roberto Exp $ +** $Id: lcode.c,v 2.112.1.1 2017/04/19 17:20:42 roberto Exp $ ** Code generator for Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lcode.h ============================================================================== --- vendor/lua/dist/src/lcode.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lcode.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lcode.h,v 1.64 2016/01/05 16:22:37 roberto Exp $ +** $Id: lcode.h,v 1.64.1.1 2017/04/19 17:20:42 roberto Exp $ ** Code generator for Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lcorolib.c ============================================================================== --- vendor/lua/dist/src/lcorolib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lcorolib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lcorolib.c,v 1.10 2016/04/11 19:19:55 roberto Exp $ +** $Id: lcorolib.c,v 1.10.1.1 2017/04/19 17:20:42 roberto Exp $ ** Coroutine Library ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lctype.c ============================================================================== --- vendor/lua/dist/src/lctype.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lctype.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lctype.c,v 1.12 2014/11/02 19:19:04 roberto Exp $ +** $Id: lctype.c,v 1.12.1.1 2017/04/19 17:20:42 roberto Exp $ ** 'ctype' functions for Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lctype.h ============================================================================== --- vendor/lua/dist/src/lctype.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lctype.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lctype.h,v 1.12 2011/07/15 12:50:29 roberto Exp $ +** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $ ** 'ctype' functions for Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/ldblib.c ============================================================================== --- vendor/lua/dist/src/ldblib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldblib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.151 2015/11/23 11:29:43 roberto Exp $ +** $Id: ldblib.c,v 1.151.1.1 2017/04/19 17:20:42 roberto Exp $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/ldebug.c ============================================================================== --- vendor/lua/dist/src/ldebug.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldebug.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.121 2016/10/19 12:32:10 roberto Exp $ +** $Id: ldebug.c,v 2.121.1.2 2017/07/10 17:21:50 roberto Exp $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, CallInfo *ci = L->ci; const char *msg; va_list argp; + luaC_checkGC(L); /* error message uses memory */ va_start(argp, fmt); msg = luaO_pushvfstring(L, fmt, argp); /* format message */ va_end(argp); Modified: vendor/lua/dist/src/ldebug.h ============================================================================== --- vendor/lua/dist/src/ldebug.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldebug.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ +** $Id: ldebug.h,v 2.14.1.1 2017/04/19 17:20:42 roberto Exp $ ** Auxiliary functions from Debug Interface module ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/ldo.c ============================================================================== --- vendor/lua/dist/src/ldo.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldo.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.157 2016/12/13 15:52:21 roberto Exp $ +** $Id: ldo.c,v 2.157.1.1 2017/04/19 17:20:42 roberto Exp $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/ldo.h ============================================================================== --- vendor/lua/dist/src/ldo.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldo.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldo.h,v 2.29 2015/12/21 13:02:14 roberto Exp $ +** $Id: ldo.h,v 2.29.1.1 2017/04/19 17:20:42 roberto Exp $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/ldump.c ============================================================================== --- vendor/lua/dist/src/ldump.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/ldump.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 2.37 2015/10/08 15:53:49 roberto Exp $ +** $Id: ldump.c,v 2.37.1.1 2017/04/19 17:20:42 roberto Exp $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lfunc.c ============================================================================== --- vendor/lua/dist/src/lfunc.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lfunc.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 2.45 2014/11/02 19:19:04 roberto Exp $ +** $Id: lfunc.c,v 2.45.1.1 2017/04/19 17:39:34 roberto Exp $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lfunc.h ============================================================================== --- vendor/lua/dist/src/lfunc.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lfunc.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp $ +** $Id: lfunc.h,v 2.15.1.1 2017/04/19 17:39:34 roberto Exp $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lgc.c ============================================================================== --- vendor/lua/dist/src/lgc.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lgc.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.215 2016/12/22 13:08:50 roberto Exp $ +** $Id: lgc.c,v 2.215.1.2 2017/08/31 16:15:27 roberto Exp $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, G for (n = gnode(h, 0); n < limit; n++) { if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { setnilvalue(gval(n)); /* remove value ... */ - removeentry(n); /* and remove entry from table */ } + if (ttisnil(gval(n))) /* is entry empty? */ + removeentry(n); /* remove entry from table */ } } } Modified: vendor/lua/dist/src/lgc.h ============================================================================== --- vendor/lua/dist/src/lgc.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lgc.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lgc.h,v 2.91 2015/12/21 13:02:14 roberto Exp $ +** $Id: lgc.h,v 2.91.1.1 2017/04/19 17:39:34 roberto Exp $ ** Garbage Collector ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/linit.c ============================================================================== --- vendor/lua/dist/src/linit.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/linit.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: linit.c,v 1.39 2016/12/04 20:17:24 roberto Exp $ +** $Id: linit.c,v 1.39.1.1 2017/04/19 17:20:42 roberto Exp $ ** Initialization of libraries for lua.c and other clients ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/liolib.c ============================================================================== --- vendor/lua/dist/src/liolib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/liolib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.151 2016/12/20 18:37:00 roberto Exp $ +** $Id: liolib.c,v 2.151.1.1 2017/04/19 17:29:57 roberto Exp $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -206,11 +206,16 @@ static int aux_close (lua_State *L) { } +static int f_close (lua_State *L) { + tofile(L); /* make sure argument is an open stream */ + return aux_close(L); +} + + static int io_close (lua_State *L) { if (lua_isnone(L, 1)) /* no argument? */ lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT); /* use standard output */ - tofile(L); /* make sure argument is an open stream */ - return aux_close(L); + return f_close(L); } @@ -712,7 +717,7 @@ static const luaL_Reg iolib[] = { ** methods for file handles */ static const luaL_Reg flib[] = { - {"close", io_close}, + {"close", f_close}, {"flush", f_flush}, {"lines", f_lines}, {"read", f_read}, Modified: vendor/lua/dist/src/llex.c ============================================================================== --- vendor/lua/dist/src/llex.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/llex.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 2.96 2016/05/02 14:02:12 roberto Exp $ +** $Id: llex.c,v 2.96.1.1 2017/04/19 17:20:42 roberto Exp $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/llex.h ============================================================================== --- vendor/lua/dist/src/llex.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/llex.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: llex.h,v 1.79 2016/05/02 14:02:12 roberto Exp $ +** $Id: llex.h,v 1.79.1.1 2017/04/19 17:20:42 roberto Exp $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/llimits.h ============================================================================== --- vendor/lua/dist/src/llimits.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/llimits.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.141 2015/11/19 19:16:22 roberto Exp $ +** $Id: llimits.h,v 1.141.1.1 2017/04/19 17:20:42 roberto Exp $ ** Limits, basic types, and some other 'installation-dependent' definitions ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lmathlib.c ============================================================================== --- vendor/lua/dist/src/lmathlib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lmathlib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.119 2016/12/22 13:08:50 roberto Exp $ +** $Id: lmathlib.c,v 1.119.1.1 2017/04/19 17:20:42 roberto Exp $ ** Standard mathematical library ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lmem.c ============================================================================== --- vendor/lua/dist/src/lmem.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lmem.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lmem.c,v 1.91 2015/03/06 19:45:54 roberto Exp $ +** $Id: lmem.c,v 1.91.1.1 2017/04/19 17:20:42 roberto Exp $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lmem.h ============================================================================== --- vendor/lua/dist/src/lmem.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lmem.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lmem.h,v 1.43 2014/12/19 17:26:14 roberto Exp $ +** $Id: lmem.h,v 1.43.1.1 2017/04/19 17:20:42 roberto Exp $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/loadlib.c ============================================================================== --- vendor/lua/dist/src/loadlib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/loadlib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.130 2017/01/12 17:14:26 roberto Exp $ +** $Id: loadlib.c,v 1.130.1.1 2017/04/19 17:20:42 roberto Exp $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** Modified: vendor/lua/dist/src/lobject.c ============================================================================== --- vendor/lua/dist/src/lobject.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lobject.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.113 2016/12/22 13:08:50 roberto Exp $ +** $Id: lobject.c,v 2.113.1.1 2017/04/19 17:29:57 roberto Exp $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -435,7 +435,8 @@ const char *luaO_pushvfstring (lua_State *L, const cha } case 'p': { /* a pointer */ char buff[4*sizeof(void *) + 8]; /* should be enough space for a '%p' */ - int l = l_sprintf(buff, sizeof(buff), "%p", va_arg(argp, void *)); + void *p = va_arg(argp, void *); + int l = lua_pointer2str(buff, sizeof(buff), p); pushstr(L, buff, l); break; } Modified: vendor/lua/dist/src/lobject.h ============================================================================== --- vendor/lua/dist/src/lobject.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lobject.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.117 2016/08/01 19:51:24 roberto Exp $ +** $Id: lobject.h,v 2.117.1.1 2017/04/19 17:39:34 roberto Exp $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lopcodes.c ============================================================================== --- vendor/lua/dist/src/lopcodes.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lopcodes.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.c,v 1.55 2015/01/05 13:48:33 roberto Exp $ +** $Id: lopcodes.c,v 1.55.1.1 2017/04/19 17:20:42 roberto Exp $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lopcodes.h ============================================================================== --- vendor/lua/dist/src/lopcodes.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lopcodes.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.h,v 1.149 2016/07/19 17:12:21 roberto Exp $ +** $Id: lopcodes.h,v 1.149.1.1 2017/04/19 17:20:42 roberto Exp $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/loslib.c ============================================================================== --- vendor/lua/dist/src/loslib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/loslib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: loslib.c,v 1.65 2016/07/18 17:58:58 roberto Exp $ +** $Id: loslib.c,v 1.65.1.1 2017/04/19 17:29:57 roberto Exp $ ** Standard Operating System library ** See Copyright Notice in lua.h */ @@ -293,7 +293,8 @@ static int os_date (lua_State *L) { else stm = l_localtime(&t, &tmr); if (stm == NULL) /* invalid date? */ - luaL_error(L, "time result cannot be represented in this installation"); + return luaL_error(L, + "time result cannot be represented in this installation"); if (strcmp(s, "*t") == 0) { lua_createtable(L, 0, 9); /* 9 = number of fields */ setallfields(L, stm); @@ -340,7 +341,8 @@ static int os_time (lua_State *L) { setallfields(L, &ts); /* update fields with normalized values */ } if (t != (time_t)(l_timet)t || t == (time_t)(-1)) - luaL_error(L, "time result cannot be represented in this installation"); + return luaL_error(L, + "time result cannot be represented in this installation"); l_pushtime(L, t); return 1; } Modified: vendor/lua/dist/src/lparser.c ============================================================================== --- vendor/lua/dist/src/lparser.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lparser.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.155 2016/08/01 19:51:24 roberto Exp $ +** $Id: lparser.c,v 2.155.1.2 2017/04/29 18:11:40 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -1392,7 +1392,7 @@ static void test_then_block (LexState *ls, int *escape luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ enterblock(fs, &bl, 0); /* must enter block before 'goto' */ gotostat(ls, v.t); /* handle goto/break */ - skipnoopstat(ls); /* skip other no-op statements */ + while (testnext(ls, ';')) {} /* skip colons */ if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ leaveblock(fs); return; /* and that is it */ Modified: vendor/lua/dist/src/lparser.h ============================================================================== --- vendor/lua/dist/src/lparser.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lparser.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lparser.h,v 1.76 2015/12/30 18:16:13 roberto Exp $ +** $Id: lparser.h,v 1.76.1.1 2017/04/19 17:20:42 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lprefix.h ============================================================================== --- vendor/lua/dist/src/lprefix.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lprefix.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ +** $Id: lprefix.h,v 1.2.1.1 2017/04/19 17:20:42 roberto Exp $ ** Definitions for Lua code that must come before any other header file ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lstate.c ============================================================================== --- vendor/lua/dist/src/lstate.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lstate.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.133 2015/11/13 12:16:51 roberto Exp $ +** $Id: lstate.c,v 2.133.1.1 2017/04/19 17:39:34 roberto Exp $ ** Global State ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lstate.h ============================================================================== --- vendor/lua/dist/src/lstate.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lstate.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.133 2016/12/22 13:08:50 roberto Exp $ +** $Id: lstate.h,v 2.133.1.1 2017/04/19 17:39:34 roberto Exp $ ** Global State ** See Copyright Notice in lua.h */ @@ -26,6 +26,24 @@ ** 'tobefnz': all objects ready to be finalized; ** 'fixedgc': all objects that are not to be collected (currently ** only small strings, such as reserved words). +** +** Moreover, there is another set of lists that control gray objects. +** These lists are linked by fields 'gclist'. (All objects that +** can become gray have such a field. The field is not the same +** in all objects, but it always has this name.) Any gray object +** must belong to one of these lists, and all objects in these lists +** must be gray: +** +** 'gray': regular gray objects, still waiting to be visited. +** 'grayagain': objects that must be revisited at the atomic phase. +** That includes +** - black objects got in a write barrier; +** - all kinds of weak tables during propagation phase; +** - all threads. +** 'weak': tables with weak values to be cleared; +** 'ephemeron': ephemeron tables with white->white entries; +** 'allweak': tables with weak keys and/or weak values to be cleared. +** The last three lists are used only during the atomic phase. */ Modified: vendor/lua/dist/src/lstring.c ============================================================================== --- vendor/lua/dist/src/lstring.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lstring.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 2.56 2015/11/23 11:32:51 roberto Exp $ +** $Id: lstring.c,v 2.56.1.1 2017/04/19 17:20:42 roberto Exp $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lstring.h ============================================================================== --- vendor/lua/dist/src/lstring.h Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lstring.h Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp $ +** $Id: lstring.h,v 1.61.1.1 2017/04/19 17:20:42 roberto Exp $ ** String table (keep all strings handled by Lua) ** See Copyright Notice in lua.h */ Modified: vendor/lua/dist/src/lstrlib.c ============================================================================== --- vendor/lua/dist/src/lstrlib.c Fri Aug 10 19:57:55 2018 (r337585) +++ vendor/lua/dist/src/lstrlib.c Fri Aug 10 20:05:41 2018 (r337586) @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.254 2016/12/22 13:08:50 roberto Exp $ +** $Id: lstrlib.c,v 1.254.1.1 2017/04/19 17:29:57 roberto Exp $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -879,7 +879,7 @@ static int lua_number2strx (lua_State *L, char *buff, buff[i] = toupper(uchar(buff[i])); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Aug 10 20:07:01 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53848107393C; Fri, 10 Aug 2018 20:07:01 +0000 (UTC) (envelope-from kevans@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 02F2F78E76; Fri, 10 Aug 2018 20:07:01 +0000 (UTC) (envelope-from kevans@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 BBF4D5097; Fri, 10 Aug 2018 20:07:00 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7AK70aA086141; Fri, 10 Aug 2018 20:07:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7AK70KB086140; Fri, 10 Aug 2018 20:07:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808102007.w7AK70KB086140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Aug 2018 20:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337587 - vendor/lua/5.3.5 X-SVN-Group: vendor X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: vendor/lua/5.3.5 X-SVN-Commit-Revision: 337587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 20:07:01 -0000 Author: kevans Date: Fri Aug 10 20:07:00 2018 New Revision: 337587 URL: https://svnweb.freebsd.org/changeset/base/337587 Log: Tag lua 5.3.5 Added: vendor/lua/5.3.5/ - copied from r337586, vendor/lua/dist/ From owner-svn-src-vendor@freebsd.org Sat Aug 11 16:29:30 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD8A71072632; Sat, 11 Aug 2018 16:29:29 +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 8DD2085F84; Sat, 11 Aug 2018 16:29:29 +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 6981B19ABC; Sat, 11 Aug 2018 16:29:29 +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 w7BGTTxa019938; Sat, 11 Aug 2018 16:29:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGTPRE019921; Sat, 11 Aug 2018 16:29:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808111629.w7BGTPRE019921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Aug 2018 16:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337631 - in vendor/llvm/dist-release_70: . docs lib/Analysis lib/CodeGen/SelectionDAG lib/MC/MCParser lib/Target/AMDGPU lib/Target/NVPTX lib/Transforms/Instrumentation test/CodeGen/AAr... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_70: . docs lib/Analysis lib/CodeGen/SelectionDAG lib/MC/MCParser lib/Target/AMDGPU lib/Target/NVPTX lib/Transforms/Instrumentation test/CodeGen/AArch64 test/CodeGen/AMDGPU ... X-SVN-Commit-Revision: 337631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:29:30 -0000 Author: dim Date: Sat Aug 11 16:29:25 2018 New Revision: 337631 URL: https://svnweb.freebsd.org/changeset/base/337631 Log: Vendor import of llvm release_70 branch r339355: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339355 Added: vendor/llvm/dist-release_70/test/CodeGen/NVPTX/load-store.ll vendor/llvm/dist-release_70/test/Instrumentation/BoundsChecking/many-traps-2.ll Deleted: vendor/llvm/dist-release_70/test/MC/ELF/extra-section-flags.s Modified: vendor/llvm/dist-release_70/CMakeLists.txt vendor/llvm/dist-release_70/docs/ReleaseNotes.rst vendor/llvm/dist-release_70/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist-release_70/lib/Analysis/ValueTracking.cpp vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist-release_70/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPUFeatures.td vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.h vendor/llvm/dist-release_70/lib/Target/AMDGPU/VOP3Instructions.td vendor/llvm/dist-release_70/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp vendor/llvm/dist-release_70/lib/Transforms/Instrumentation/BoundsChecking.cpp vendor/llvm/dist-release_70/test/CodeGen/AArch64/fcopysign.ll vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/kernel-args.ll vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/mad_uint24.ll vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/r600.work-item-intrinsics.ll vendor/llvm/dist-release_70/test/CodeGen/X86/masked_memop.ll vendor/llvm/dist-release_70/test/Transforms/InstSimplify/AndOrXor.ll vendor/llvm/dist-release_70/test/Transforms/InstSimplify/floating-point-compare.ll vendor/llvm/dist-release_70/test/Transforms/NewGVN/pair_jumpthread.ll Modified: vendor/llvm/dist-release_70/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_70/CMakeLists.txt Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/CMakeLists.txt Sat Aug 11 16:29:25 2018 (r337631) @@ -1037,6 +1037,6 @@ if(LLVM_DISTRIBUTION_COMPONENTS) endif() # This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake -if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") +if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_INSTALL_UCRT_LIBRARIES) include(InstallRequiredSystemLibraries) endif() Modified: vendor/llvm/dist-release_70/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist-release_70/docs/ReleaseNotes.rst Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/docs/ReleaseNotes.rst Sat Aug 11 16:29:25 2018 (r337631) @@ -40,6 +40,12 @@ Non-comprehensive list of changes in this release functionality, or simply have a lot to talk about), see the `NOTE` below for adding a new subsection. +* The Windows installer no longer includes a Visual Studio integration. + Instead, a new + `LLVM Compiler Toolchain Visual Studio extension ` + is available on the Visual Studio Marketplace. The new integration includes + support for Visual Studio 2017. + * Libraries have been renamed from 7.0 to 7. This change also impacts downstream libraries like lldb. @@ -155,6 +161,26 @@ Changes to the PowerPC Target During this release ... +Changes to the SystemZ Target +----------------------------- + +During this release the SystemZ target has: + +* Added support for vector registers in inline asm statements. + +* Added support for stackmaps, patchpoints, and the anyregcc + calling convention. + +* Changed the default function alignment to 16 bytes. + +* Improved codegen for condition code handling. + +* Improved instruction scheduling and microarchitecture tuning for z13/z14. + +* Fixed support for generating GCOV coverage data. + +* Fixed some codegen bugs. + Changes to the X86 Target ------------------------- @@ -191,6 +217,10 @@ Changes to the DAG infrastructure should use UADDO/ADDCARRY/USUBO/SUBCARRY instead of the deprecated opcodes. * The SETCCE opcode has now been removed in favor of SETCCCARRY. + +* TableGen now supports multi-alternative pattern fragments via the PatFrags + class. PatFrag is now derived from PatFrags, which may require minor + changes to backends that directly access PatFrag members. External Open Source Projects Using LLVM 7 ========================================== Modified: vendor/llvm/dist-release_70/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/Analysis/InstructionSimplify.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Analysis/InstructionSimplify.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -1863,6 +1863,40 @@ static Value *SimplifyAndInst(Value *Op0, Value *Op1, MaxRecurse)) return V; + // Assuming the effective width of Y is not larger than A, i.e. all bits + // from X and Y are disjoint in (X << A) | Y, + // if the mask of this AND op covers all bits of X or Y, while it covers + // no bits from the other, we can bypass this AND op. E.g., + // ((X << A) | Y) & Mask -> Y, + // if Mask = ((1 << effective_width_of(Y)) - 1) + // ((X << A) | Y) & Mask -> X << A, + // if Mask = ((1 << effective_width_of(X)) - 1) << A + // SimplifyDemandedBits in InstCombine can optimize the general case. + // This pattern aims to help other passes for a common case. + Value *Y, *XShifted; + if (match(Op1, m_APInt(Mask)) && + match(Op0, m_c_Or(m_CombineAnd(m_NUWShl(m_Value(X), m_APInt(ShAmt)), + m_Value(XShifted)), + m_Value(Y)))) { + const unsigned ShftCnt = ShAmt->getZExtValue(); + const KnownBits YKnown = computeKnownBits(Y, Q.DL, 0, Q.AC, Q.CxtI, Q.DT); + const unsigned Width = Op0->getType()->getScalarSizeInBits(); + const unsigned EffWidthY = Width - YKnown.countMinLeadingZeros(); + if (EffWidthY <= ShftCnt) { + const KnownBits XKnown = computeKnownBits(X, Q.DL, 0, Q.AC, Q.CxtI, + Q.DT); + const unsigned EffWidthX = Width - XKnown.countMinLeadingZeros(); + const APInt EffBitsY = APInt::getLowBitsSet(Width, EffWidthY); + const APInt EffBitsX = APInt::getLowBitsSet(Width, EffWidthX) << ShftCnt; + // If the mask is extracting all bits from X or Y as is, we can skip + // this AND op. + if (EffBitsY.isSubsetOf(*Mask) && !EffBitsX.intersects(*Mask)) + return Y; + if (EffBitsX.isSubsetOf(*Mask) && !EffBitsY.intersects(*Mask)) + return XShifted; + } + } + return nullptr; } Modified: vendor/llvm/dist-release_70/lib/Analysis/ValueTracking.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/Analysis/ValueTracking.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Analysis/ValueTracking.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -2817,10 +2817,13 @@ static bool cannotBeOrderedLessThanZeroImpl(const Valu default: break; case Intrinsic::maxnum: - return cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, SignBitOnly, - Depth + 1) || - cannotBeOrderedLessThanZeroImpl(I->getOperand(1), TLI, SignBitOnly, - Depth + 1); + return (isKnownNeverNaN(I->getOperand(0)) && + cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, + SignBitOnly, Depth + 1)) || + (isKnownNeverNaN(I->getOperand(1)) && + cannotBeOrderedLessThanZeroImpl(I->getOperand(1), TLI, + SignBitOnly, Depth + 1)); + case Intrinsic::minnum: return cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, SignBitOnly, Depth + 1) && Modified: vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -1489,24 +1489,20 @@ SDValue SelectionDAGLegalize::ExpandFCOPYSIGN(SDNode * // Get the signbit at the right position for MagAsInt. int ShiftAmount = SignAsInt.SignBit - MagAsInt.SignBit; + EVT ShiftVT = IntVT; + if (SignBit.getValueSizeInBits() < ClearedSign.getValueSizeInBits()) { + SignBit = DAG.getNode(ISD::ZERO_EXTEND, DL, MagVT, SignBit); + ShiftVT = MagVT; + } + if (ShiftAmount > 0) { + SDValue ShiftCnst = DAG.getConstant(ShiftAmount, DL, ShiftVT); + SignBit = DAG.getNode(ISD::SRL, DL, ShiftVT, SignBit, ShiftCnst); + } else if (ShiftAmount < 0) { + SDValue ShiftCnst = DAG.getConstant(-ShiftAmount, DL, ShiftVT); + SignBit = DAG.getNode(ISD::SHL, DL, ShiftVT, SignBit, ShiftCnst); + } if (SignBit.getValueSizeInBits() > ClearedSign.getValueSizeInBits()) { - if (ShiftAmount > 0) { - SDValue ShiftCnst = DAG.getConstant(ShiftAmount, DL, IntVT); - SignBit = DAG.getNode(ISD::SRL, DL, IntVT, SignBit, ShiftCnst); - } else if (ShiftAmount < 0) { - SDValue ShiftCnst = DAG.getConstant(-ShiftAmount, DL, IntVT); - SignBit = DAG.getNode(ISD::SHL, DL, IntVT, SignBit, ShiftCnst); - } SignBit = DAG.getNode(ISD::TRUNCATE, DL, MagVT, SignBit); - } else if (SignBit.getValueSizeInBits() < ClearedSign.getValueSizeInBits()) { - SignBit = DAG.getNode(ISD::ZERO_EXTEND, DL, MagVT, SignBit); - if (ShiftAmount > 0) { - SDValue ShiftCnst = DAG.getConstant(ShiftAmount, DL, MagVT); - SignBit = DAG.getNode(ISD::SRL, DL, MagVT, SignBit, ShiftCnst); - } else if (ShiftAmount < 0) { - SDValue ShiftCnst = DAG.getConstant(-ShiftAmount, DL, MagVT); - SignBit = DAG.getNode(ISD::SHL, DL, MagVT, SignBit, ShiftCnst); - } } // Store the part with the modified sign and convert back to float. Modified: vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -3641,26 +3641,43 @@ SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) } SDValue DAGTypeLegalizer::WidenVecOp_MSTORE(SDNode *N, unsigned OpNo) { - assert(OpNo == 3 && "Can widen only data operand of mstore"); + assert((OpNo == 2 || OpNo == 3) && + "Can widen only data or mask operand of mstore"); MaskedStoreSDNode *MST = cast(N); SDValue Mask = MST->getMask(); EVT MaskVT = Mask.getValueType(); SDValue StVal = MST->getValue(); - // Widen the value - SDValue WideVal = GetWidenedVector(StVal); SDLoc dl(N); - // The mask should be widened as well. - EVT WideVT = WideVal.getValueType(); - EVT WideMaskVT = EVT::getVectorVT(*DAG.getContext(), - MaskVT.getVectorElementType(), - WideVT.getVectorNumElements()); - Mask = ModifyToType(Mask, WideMaskVT, true); + if (OpNo == 3) { + // Widen the value + StVal = GetWidenedVector(StVal); + // The mask should be widened as well. + EVT WideVT = StVal.getValueType(); + EVT WideMaskVT = EVT::getVectorVT(*DAG.getContext(), + MaskVT.getVectorElementType(), + WideVT.getVectorNumElements()); + Mask = ModifyToType(Mask, WideMaskVT, true); + } else { + EVT WideMaskVT = TLI.getTypeToTransformTo(*DAG.getContext(), MaskVT); + Mask = ModifyToType(Mask, WideMaskVT, true); + + EVT ValueVT = StVal.getValueType(); + if (getTypeAction(ValueVT) == TargetLowering::TypeWidenVector) + StVal = GetWidenedVector(StVal); + else { + EVT WideVT = EVT::getVectorVT(*DAG.getContext(), + ValueVT.getVectorElementType(), + WideMaskVT.getVectorNumElements()); + StVal = ModifyToType(StVal, WideVT); + } + } + assert(Mask.getValueType().getVectorNumElements() == - WideVal.getValueType().getVectorNumElements() && + StVal.getValueType().getVectorNumElements() && "Mask and data vectors should have the same number of elements"); - return DAG.getMaskedStore(MST->getChain(), dl, WideVal, MST->getBasePtr(), + return DAG.getMaskedStore(MST->getChain(), dl, StVal, MST->getBasePtr(), Mask, MST->getMemoryVT(), MST->getMemOperand(), false, MST->isCompressingStore()); } Modified: vendor/llvm/dist-release_70/lib/MC/MCParser/ELFAsmParser.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/MC/MCParser/ELFAsmParser.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/MC/MCParser/ELFAsmParser.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -481,34 +481,6 @@ static bool hasPrefix(StringRef SectionName, StringRef return SectionName.startswith(Prefix) || SectionName == Prefix.drop_back(); } -// Return a set of section flags based on the section name that can then -// be augmented later, otherwise return 0 if we don't have any reasonable -// defaults. -static unsigned defaultSectionFlags(StringRef SectionName) { - - if (hasPrefix(SectionName, ".rodata.cst")) - return ELF::SHF_ALLOC | ELF::SHF_MERGE; - - if (hasPrefix(SectionName, ".rodata.") || SectionName == ".rodata1") - return ELF::SHF_ALLOC; - - if (SectionName == ".fini" || SectionName == ".init" || - hasPrefix(SectionName, ".text.")) - return ELF::SHF_ALLOC | ELF::SHF_EXECINSTR; - - if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" || - hasPrefix(SectionName, ".bss.") || - hasPrefix(SectionName, ".init_array.") || - hasPrefix(SectionName, ".fini_array.") || - hasPrefix(SectionName, ".preinit_array.")) - return ELF::SHF_ALLOC | ELF::SHF_WRITE; - - if (hasPrefix(SectionName, ".tdata.") || hasPrefix(SectionName, ".tbss.")) - return ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_TLS; - - return 0; -} - bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) { StringRef SectionName; @@ -518,13 +490,27 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, StringRef TypeName; int64_t Size = 0; StringRef GroupName; + unsigned Flags = 0; const MCExpr *Subsection = nullptr; bool UseLastGroup = false; MCSymbolELF *Associated = nullptr; int64_t UniqueID = ~0; - // Set the default section flags first in case no others are given. - unsigned Flags = defaultSectionFlags(SectionName); + // Set the defaults first. + if (hasPrefix(SectionName, ".rodata.") || SectionName == ".rodata1") + Flags |= ELF::SHF_ALLOC; + else if (SectionName == ".fini" || SectionName == ".init" || + hasPrefix(SectionName, ".text.")) + Flags |= ELF::SHF_ALLOC | ELF::SHF_EXECINSTR; + else if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" || + hasPrefix(SectionName, ".bss.") || + hasPrefix(SectionName, ".init_array.") || + hasPrefix(SectionName, ".fini_array.") || + hasPrefix(SectionName, ".preinit_array.")) + Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE; + else if (hasPrefix(SectionName, ".tdata.") || + hasPrefix(SectionName, ".tbss.")) + Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_TLS; if (getLexer().is(AsmToken::Comma)) { Lex(); @@ -552,12 +538,6 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, if (extraFlags == -1U) return TokError("unknown flag"); - - // If we found additional section flags on a known section then give a - // warning. - if (Flags && Flags != extraFlags) - Warning(loc, "setting incorrect section attributes for " + SectionName); - Flags |= extraFlags; bool Mergeable = Flags & ELF::SHF_MERGE; Modified: vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPU.td ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPU.td Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPU.td Sat Aug 11 16:29:25 2018 (r337631) @@ -267,15 +267,6 @@ def FeatureD16PreservesUnusedBits : SubtargetFeature< // Subtarget Features (options and debugging) //===------------------------------------------------------------===// -// Some instructions do not support denormals despite this flag. Using -// fp32 denormals also causes instructions to run at the double -// precision rate for the device. -def FeatureFP32Denormals : SubtargetFeature<"fp32-denormals", - "FP32Denormals", - "true", - "Enable single precision denormal handling" ->; - // Denormal handling for fp64 and fp16 is controlled by the same // config register when fp16 supported. // TODO: Do we need a separate f16 setting when not legal? Modified: vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPUFeatures.td ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPUFeatures.td Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/AMDGPU/AMDGPUFeatures.td Sat Aug 11 16:29:25 2018 (r337631) @@ -19,6 +19,15 @@ def FeatureFMA : SubtargetFeature<"fmaf", "Enable single precision FMA (not as fast as mul+add, but fused)" >; +// Some instructions do not support denormals despite this flag. Using +// fp32 denormals also causes instructions to run at the double +// precision rate for the device. +def FeatureFP32Denormals : SubtargetFeature<"fp32-denormals", + "FP32Denormals", + "true", + "Enable single precision denormal handling" +>; + class SubtargetFeatureLocalMemorySize : SubtargetFeature< "localmemorysize"#Value, "LocalMemorySize", Modified: vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -903,7 +903,7 @@ SDValue R600TargetLowering::LowerImplicitParameter(Sel unsigned DwordOffset) const { unsigned ByteOffset = DwordOffset * 4; PointerType * PtrType = PointerType::get(VT.getTypeForEVT(*DAG.getContext()), - AMDGPUASI.CONSTANT_BUFFER_0); + AMDGPUASI.PARAM_I_ADDRESS); // We shouldn't be using an offset wider than 16-bits for implicit parameters. assert(isInt<16>(ByteOffset)); @@ -1457,33 +1457,17 @@ SDValue R600TargetLowering::LowerLOAD(SDValue Op, Sele return scalarizeVectorLoad(LoadNode, DAG); } + // This is still used for explicit load from addrspace(8) int ConstantBlock = ConstantAddressBlock(LoadNode->getAddressSpace()); if (ConstantBlock > -1 && ((LoadNode->getExtensionType() == ISD::NON_EXTLOAD) || (LoadNode->getExtensionType() == ISD::ZEXTLOAD))) { SDValue Result; - if (isa(LoadNode->getMemOperand()->getValue()) || - isa(LoadNode->getMemOperand()->getValue()) || + if (isa(LoadNode->getMemOperand()->getValue()) || isa(Ptr)) { - SDValue Slots[4]; - for (unsigned i = 0; i < 4; i++) { - // We want Const position encoded with the following formula : - // (((512 + (kc_bank << 12) + const_index) << 2) + chan) - // const_index is Ptr computed by llvm using an alignment of 16. - // Thus we add (((512 + (kc_bank << 12)) + chan ) * 4 here and - // then div by 4 at the ISel step - SDValue NewPtr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, - DAG.getConstant(4 * i + ConstantBlock * 16, DL, MVT::i32)); - Slots[i] = DAG.getNode(AMDGPUISD::CONST_ADDRESS, DL, MVT::i32, NewPtr); - } - EVT NewVT = MVT::v4i32; - unsigned NumElements = 4; - if (VT.isVector()) { - NewVT = VT; - NumElements = VT.getVectorNumElements(); - } - Result = DAG.getBuildVector(NewVT, DL, makeArrayRef(Slots, NumElements)); + return constBufferLoad(LoadNode, LoadNode->getAddressSpace(), DAG); } else { + //TODO: Does this even work? // non-constant ptr can't be folded, keeps it as a v4f32 load Result = DAG.getNode(AMDGPUISD::CONST_ADDRESS, DL, MVT::v4i32, DAG.getNode(ISD::SRL, DL, MVT::i32, Ptr, @@ -1622,7 +1606,7 @@ SDValue R600TargetLowering::LowerFormalArguments( } PointerType *PtrTy = PointerType::get(VT.getTypeForEVT(*DAG.getContext()), - AMDGPUASI.CONSTANT_BUFFER_0); + AMDGPUASI.PARAM_I_ADDRESS); // i64 isn't a legal type, so the register type used ends up as i32, which // isn't expected here. It attempts to create this sextload, but it ends up @@ -1646,17 +1630,17 @@ SDValue R600TargetLowering::LowerFormalArguments( unsigned ValBase = ArgLocs[In.getOrigArgIndex()].getLocMemOffset(); unsigned PartOffset = VA.getLocMemOffset(); + unsigned Alignment = MinAlign(VT.getStoreSize(), PartOffset); MachinePointerInfo PtrInfo(UndefValue::get(PtrTy), PartOffset - ValBase); SDValue Arg = DAG.getLoad( ISD::UNINDEXED, Ext, VT, DL, Chain, DAG.getConstant(PartOffset, DL, MVT::i32), DAG.getUNDEF(MVT::i32), PtrInfo, - MemVT, /* Alignment = */ 4, MachineMemOperand::MONonTemporal | + MemVT, Alignment, MachineMemOperand::MONonTemporal | MachineMemOperand::MODereferenceable | MachineMemOperand::MOInvariant); - // 4 is the preferred alignment for the CONSTANT memory space. InVals.push_back(Arg); } return Chain; @@ -1804,6 +1788,52 @@ SDValue R600TargetLowering::OptimizeSwizzle(SDValue Bu return BuildVector; } +SDValue R600TargetLowering::constBufferLoad(LoadSDNode *LoadNode, int Block, + SelectionDAG &DAG) const { + SDLoc DL(LoadNode); + EVT VT = LoadNode->getValueType(0); + SDValue Chain = LoadNode->getChain(); + SDValue Ptr = LoadNode->getBasePtr(); + assert (isa(Ptr)); + + //TODO: Support smaller loads + if (LoadNode->getMemoryVT().getScalarType() != MVT::i32 || !ISD::isNON_EXTLoad(LoadNode)) + return SDValue(); + + if (LoadNode->getAlignment() < 4) + return SDValue(); + + int ConstantBlock = ConstantAddressBlock(Block); + + SDValue Slots[4]; + for (unsigned i = 0; i < 4; i++) { + // We want Const position encoded with the following formula : + // (((512 + (kc_bank << 12) + const_index) << 2) + chan) + // const_index is Ptr computed by llvm using an alignment of 16. + // Thus we add (((512 + (kc_bank << 12)) + chan ) * 4 here and + // then div by 4 at the ISel step + SDValue NewPtr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, + DAG.getConstant(4 * i + ConstantBlock * 16, DL, MVT::i32)); + Slots[i] = DAG.getNode(AMDGPUISD::CONST_ADDRESS, DL, MVT::i32, NewPtr); + } + EVT NewVT = MVT::v4i32; + unsigned NumElements = 4; + if (VT.isVector()) { + NewVT = VT; + NumElements = VT.getVectorNumElements(); + } + SDValue Result = DAG.getBuildVector(NewVT, DL, makeArrayRef(Slots, NumElements)); + if (!VT.isVector()) { + Result = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, MVT::i32, Result, + DAG.getConstant(0, DL, MVT::i32)); + } + SDValue MergedValues[2] = { + Result, + Chain + }; + return DAG.getMergeValues(MergedValues, DL); +} + //===----------------------------------------------------------------------===// // Custom DAG Optimizations //===----------------------------------------------------------------------===// @@ -2022,6 +2052,16 @@ SDValue R600TargetLowering::PerformDAGCombine(SDNode * NewArgs[1] = OptimizeSwizzle(N->getOperand(1), &NewArgs[2], DAG, DL); return DAG.getNode(AMDGPUISD::TEXTURE_FETCH, DL, N->getVTList(), NewArgs); } + + case ISD::LOAD: { + LoadSDNode *LoadNode = cast(N); + SDValue Ptr = LoadNode->getBasePtr(); + if (LoadNode->getAddressSpace() == AMDGPUAS::PARAM_I_ADDRESS && + isa(Ptr)) + return constBufferLoad(LoadNode, AMDGPUAS::CONSTANT_BUFFER_0, DAG); + break; + } + default: break; } Modified: vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.h ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.h Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/AMDGPU/R600ISelLowering.h Sat Aug 11 16:29:25 2018 (r337631) @@ -98,9 +98,11 @@ class R600TargetLowering final : public AMDGPUTargetLo bool isHWTrueValue(SDValue Op) const; bool isHWFalseValue(SDValue Op) const; - bool FoldOperand(SDNode *ParentNode, unsigned SrcIdx, SDValue &Src, - SDValue &Neg, SDValue &Abs, SDValue &Sel, SDValue &Imm, - SelectionDAG &DAG) const; + bool FoldOperand(SDNode *ParentNode, unsigned SrcIdx, SDValue &Src, + SDValue &Neg, SDValue &Abs, SDValue &Sel, SDValue &Imm, + SelectionDAG &DAG) const; + SDValue constBufferLoad(LoadSDNode *LoadNode, int Block, + SelectionDAG &DAG) const; SDNode *PostISelFolding(MachineSDNode *N, SelectionDAG &DAG) const override; }; Modified: vendor/llvm/dist-release_70/lib/Target/AMDGPU/VOP3Instructions.td ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/AMDGPU/VOP3Instructions.td Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/AMDGPU/VOP3Instructions.td Sat Aug 11 16:29:25 2018 (r337631) @@ -461,17 +461,6 @@ def : GCNPat < (inst i16:$src0, i16:$src1, i16:$src2, (i1 0)) >; -def : GCNPat< - (i32 (op3 (op2 (op1 i16:$src0, i16:$src1), i16:$src2))), - (inst i16:$src0, i16:$src1, i16:$src2, (i1 0)) ->; - -def : GCNPat< - (i64 (op3 (op2 (op1 i16:$src0, i16:$src1), i16:$src2))), - (REG_SEQUENCE VReg_64, - (inst i16:$src0, i16:$src1, i16:$src2, (i1 0)), sub0, - (V_MOV_B32_e32 (i32 0)), sub1) ->; } defm: Ternary_i16_Pats; Modified: vendor/llvm/dist-release_70/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -16,6 +16,7 @@ #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/Instructions.h" +#include "llvm/Support/AtomicOrdering.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -81,10 +82,12 @@ void NVPTXDAGToDAGISel::Select(SDNode *N) { switch (N->getOpcode()) { case ISD::LOAD: + case ISD::ATOMIC_LOAD: if (tryLoad(N)) return; break; case ISD::STORE: + case ISD::ATOMIC_STORE: if (tryStore(N)) return; break; @@ -834,17 +837,27 @@ static Optional pickOpcodeForVT( bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) { SDLoc dl(N); - LoadSDNode *LD = cast(N); + MemSDNode *LD = cast(N); + assert(LD->readMem() && "Expected load"); + LoadSDNode *PlainLoad = dyn_cast(N); EVT LoadedVT = LD->getMemoryVT(); SDNode *NVPTXLD = nullptr; // do not support pre/post inc/dec - if (LD->isIndexed()) + if (PlainLoad && PlainLoad->isIndexed()) return false; if (!LoadedVT.isSimple()) return false; + AtomicOrdering Ordering = LD->getOrdering(); + // In order to lower atomic loads with stronger guarantees we would need to + // use load.acquire or insert fences. However these features were only added + // with PTX ISA 6.0 / sm_70. + // TODO: Check if we can actually use the new instructions and implement them. + if (isStrongerThanMonotonic(Ordering)) + return false; + // Address Space Setting unsigned int CodeAddrSpace = getCodeAddrSpace(LD); if (canLowerToLDG(LD, *Subtarget, CodeAddrSpace, MF)) { @@ -855,8 +868,9 @@ bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) { CurDAG->getDataLayout().getPointerSizeInBits(LD->getAddressSpace()); // Volatile Setting - // - .volatile is only availalble for .global and .shared - bool isVolatile = LD->isVolatile(); + // - .volatile is only available for .global and .shared + // - .volatile has the same memory synchronization semantics as .relaxed.sys + bool isVolatile = LD->isVolatile() || Ordering == AtomicOrdering::Monotonic; if (CodeAddrSpace != NVPTX::PTXLdStInstCode::GLOBAL && CodeAddrSpace != NVPTX::PTXLdStInstCode::SHARED && CodeAddrSpace != NVPTX::PTXLdStInstCode::GENERIC) @@ -882,7 +896,7 @@ bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) { fromTypeWidth = 32; } - if ((LD->getExtensionType() == ISD::SEXTLOAD)) + if (PlainLoad && (PlainLoad->getExtensionType() == ISD::SEXTLOAD)) fromType = NVPTX::PTXLdStInstCode::Signed; else if (ScalarVT.isFloatingPoint()) // f16 uses .b16 as its storage type. @@ -1691,25 +1705,38 @@ bool NVPTXDAGToDAGISel::tryLDGLDU(SDNode *N) { bool NVPTXDAGToDAGISel::tryStore(SDNode *N) { SDLoc dl(N); - StoreSDNode *ST = cast(N); + MemSDNode *ST = cast(N); + assert(ST->writeMem() && "Expected store"); + StoreSDNode *PlainStore = dyn_cast(N); + AtomicSDNode *AtomicStore = dyn_cast(N); + assert((PlainStore || AtomicStore) && "Expected store"); EVT StoreVT = ST->getMemoryVT(); SDNode *NVPTXST = nullptr; // do not support pre/post inc/dec - if (ST->isIndexed()) + if (PlainStore && PlainStore->isIndexed()) return false; if (!StoreVT.isSimple()) return false; + AtomicOrdering Ordering = ST->getOrdering(); + // In order to lower atomic loads with stronger guarantees we would need to + // use store.release or insert fences. However these features were only added + // with PTX ISA 6.0 / sm_70. + // TODO: Check if we can actually use the new instructions and implement them. + if (isStrongerThanMonotonic(Ordering)) + return false; + // Address Space Setting unsigned int CodeAddrSpace = getCodeAddrSpace(ST); unsigned int PointerSize = CurDAG->getDataLayout().getPointerSizeInBits(ST->getAddressSpace()); // Volatile Setting - // - .volatile is only availalble for .global and .shared - bool isVolatile = ST->isVolatile(); + // - .volatile is only available for .global and .shared + // - .volatile has the same memory synchronization semantics as .relaxed.sys + bool isVolatile = ST->isVolatile() || Ordering == AtomicOrdering::Monotonic; if (CodeAddrSpace != NVPTX::PTXLdStInstCode::GLOBAL && CodeAddrSpace != NVPTX::PTXLdStInstCode::SHARED && CodeAddrSpace != NVPTX::PTXLdStInstCode::GENERIC) @@ -1739,41 +1766,53 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) { toType = NVPTX::PTXLdStInstCode::Unsigned; // Create the machine instruction DAG - SDValue Chain = N->getOperand(0); - SDValue N1 = N->getOperand(1); - SDValue N2 = N->getOperand(2); + SDValue Chain = ST->getChain(); + SDValue Value = PlainStore ? PlainStore->getValue() : AtomicStore->getVal(); + SDValue BasePtr = ST->getBasePtr(); SDValue Addr; SDValue Offset, Base; Optional Opcode; - MVT::SimpleValueType SourceVT = N1.getNode()->getSimpleValueType(0).SimpleTy; + MVT::SimpleValueType SourceVT = + Value.getNode()->getSimpleValueType(0).SimpleTy; - if (SelectDirectAddr(N2, Addr)) { + if (SelectDirectAddr(BasePtr, Addr)) { Opcode = pickOpcodeForVT(SourceVT, NVPTX::ST_i8_avar, NVPTX::ST_i16_avar, NVPTX::ST_i32_avar, NVPTX::ST_i64_avar, NVPTX::ST_f16_avar, NVPTX::ST_f16x2_avar, NVPTX::ST_f32_avar, NVPTX::ST_f64_avar); if (!Opcode) return false; - SDValue Ops[] = { N1, getI32Imm(isVolatile, dl), - getI32Imm(CodeAddrSpace, dl), getI32Imm(vecType, dl), - getI32Imm(toType, dl), getI32Imm(toTypeWidth, dl), Addr, - Chain }; + SDValue Ops[] = {Value, + getI32Imm(isVolatile, dl), + getI32Imm(CodeAddrSpace, dl), + getI32Imm(vecType, dl), + getI32Imm(toType, dl), + getI32Imm(toTypeWidth, dl), + Addr, + Chain}; NVPTXST = CurDAG->getMachineNode(Opcode.getValue(), dl, MVT::Other, Ops); - } else if (PointerSize == 64 ? SelectADDRsi64(N2.getNode(), N2, Base, Offset) - : SelectADDRsi(N2.getNode(), N2, Base, Offset)) { + } else if (PointerSize == 64 + ? SelectADDRsi64(BasePtr.getNode(), BasePtr, Base, Offset) + : SelectADDRsi(BasePtr.getNode(), BasePtr, Base, Offset)) { Opcode = pickOpcodeForVT(SourceVT, NVPTX::ST_i8_asi, NVPTX::ST_i16_asi, NVPTX::ST_i32_asi, NVPTX::ST_i64_asi, NVPTX::ST_f16_asi, NVPTX::ST_f16x2_asi, NVPTX::ST_f32_asi, NVPTX::ST_f64_asi); if (!Opcode) return false; - SDValue Ops[] = { N1, getI32Imm(isVolatile, dl), - getI32Imm(CodeAddrSpace, dl), getI32Imm(vecType, dl), - getI32Imm(toType, dl), getI32Imm(toTypeWidth, dl), Base, - Offset, Chain }; + SDValue Ops[] = {Value, + getI32Imm(isVolatile, dl), + getI32Imm(CodeAddrSpace, dl), + getI32Imm(vecType, dl), + getI32Imm(toType, dl), + getI32Imm(toTypeWidth, dl), + Base, + Offset, + Chain}; NVPTXST = CurDAG->getMachineNode(Opcode.getValue(), dl, MVT::Other, Ops); - } else if (PointerSize == 64 ? SelectADDRri64(N2.getNode(), N2, Base, Offset) - : SelectADDRri(N2.getNode(), N2, Base, Offset)) { + } else if (PointerSize == 64 + ? SelectADDRri64(BasePtr.getNode(), BasePtr, Base, Offset) + : SelectADDRri(BasePtr.getNode(), BasePtr, Base, Offset)) { if (PointerSize == 64) Opcode = pickOpcodeForVT( SourceVT, NVPTX::ST_i8_ari_64, NVPTX::ST_i16_ari_64, @@ -1787,10 +1826,15 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) { if (!Opcode) return false; - SDValue Ops[] = { N1, getI32Imm(isVolatile, dl), - getI32Imm(CodeAddrSpace, dl), getI32Imm(vecType, dl), - getI32Imm(toType, dl), getI32Imm(toTypeWidth, dl), Base, - Offset, Chain }; + SDValue Ops[] = {Value, + getI32Imm(isVolatile, dl), + getI32Imm(CodeAddrSpace, dl), + getI32Imm(vecType, dl), + getI32Imm(toType, dl), + getI32Imm(toTypeWidth, dl), + Base, + Offset, + Chain}; NVPTXST = CurDAG->getMachineNode(Opcode.getValue(), dl, MVT::Other, Ops); } else { if (PointerSize == 64) @@ -1806,10 +1850,14 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) { NVPTX::ST_f32_areg, NVPTX::ST_f64_areg); if (!Opcode) return false; - SDValue Ops[] = { N1, getI32Imm(isVolatile, dl), - getI32Imm(CodeAddrSpace, dl), getI32Imm(vecType, dl), - getI32Imm(toType, dl), getI32Imm(toTypeWidth, dl), N2, - Chain }; + SDValue Ops[] = {Value, + getI32Imm(isVolatile, dl), + getI32Imm(CodeAddrSpace, dl), + getI32Imm(vecType, dl), + getI32Imm(toType, dl), + getI32Imm(toTypeWidth, dl), + BasePtr, + Chain}; NVPTXST = CurDAG->getMachineNode(Opcode.getValue(), dl, MVT::Other, Ops); } Modified: vendor/llvm/dist-release_70/lib/Transforms/Instrumentation/BoundsChecking.cpp ============================================================================== --- vendor/llvm/dist-release_70/lib/Transforms/Instrumentation/BoundsChecking.cpp Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/lib/Transforms/Instrumentation/BoundsChecking.cpp Sat Aug 11 16:29:25 2018 (r337631) @@ -47,21 +47,17 @@ STATISTIC(ChecksUnable, "Bounds checks unable to add") using BuilderTy = IRBuilder; -/// Adds run-time bounds checks to memory accessing instructions. +/// Gets the conditions under which memory accessing instructions will overflow. /// /// \p Ptr is the pointer that will be read/written, and \p InstVal is either /// the result from the load or the value being stored. It is used to determine /// the size of memory block that is touched. /// -/// \p GetTrapBB is a callable that returns the trap BB to use on failure. -/// -/// Returns true if any change was made to the IR, false otherwise. -template -static bool instrumentMemAccess(Value *Ptr, Value *InstVal, - const DataLayout &DL, TargetLibraryInfo &TLI, - ObjectSizeOffsetEvaluator &ObjSizeEval, - BuilderTy &IRB, GetTrapBBT GetTrapBB, - ScalarEvolution &SE) { +/// Returns the condition under which the access will overflow. +static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal, + const DataLayout &DL, TargetLibraryInfo &TLI, + ObjectSizeOffsetEvaluator &ObjSizeEval, + BuilderTy &IRB, ScalarEvolution &SE) { uint64_t NeededSize = DL.getTypeStoreSize(InstVal->getType()); LLVM_DEBUG(dbgs() << "Instrument " << *Ptr << " for " << Twine(NeededSize) << " bytes\n"); @@ -70,7 +66,7 @@ static bool instrumentMemAccess(Value *Ptr, Value *Ins if (!ObjSizeEval.bothKnown(SizeOffset)) { ++ChecksUnable; - return false; + return nullptr; } Value *Size = SizeOffset.first; @@ -107,13 +103,23 @@ static bool instrumentMemAccess(Value *Ptr, Value *Ins Or = IRB.CreateOr(Cmp1, Or); } + return Or; +} + +/// Adds run-time bounds checks to memory accessing instructions. +/// +/// \p Or is the condition that should guard the trap. +/// +/// \p GetTrapBB is a callable that returns the trap BB to use on failure. +template +static void insertBoundsCheck(Value *Or, BuilderTy IRB, GetTrapBBT GetTrapBB) { // check if the comparison is always false ConstantInt *C = dyn_cast_or_null(Or); if (C) { ++ChecksSkipped; // If non-zero, nothing to do. if (!C->getZExtValue()) - return true; + return; } ++ChecksAdded; @@ -127,12 +133,11 @@ static bool instrumentMemAccess(Value *Ptr, Value *Ins // FIXME: We should really handle this differently to bypass the splitting // the block. BranchInst::Create(GetTrapBB(IRB), OldBB); - return true; + return; } // Create the conditional branch. BranchInst::Create(GetTrapBB(IRB), Cont, Or, OldBB); - return true; } static bool addBoundsChecking(Function &F, TargetLibraryInfo &TLI, @@ -143,11 +148,25 @@ static bool addBoundsChecking(Function &F, TargetLibra // check HANDLE_MEMORY_INST in include/llvm/Instruction.def for memory // touching instructions - std::vector WorkList; + SmallVector, 4> TrapInfo; for (Instruction &I : instructions(F)) { - if (isa(I) || isa(I) || isa(I) || - isa(I)) - WorkList.push_back(&I); + Value *Or = nullptr; + BuilderTy IRB(I.getParent(), BasicBlock::iterator(&I), TargetFolder(DL)); + if (LoadInst *LI = dyn_cast(&I)) { + Or = getBoundsCheckCond(LI->getPointerOperand(), LI, DL, TLI, + ObjSizeEval, IRB, SE); + } else if (StoreInst *SI = dyn_cast(&I)) { + Or = getBoundsCheckCond(SI->getPointerOperand(), SI->getValueOperand(), + DL, TLI, ObjSizeEval, IRB, SE); + } else if (AtomicCmpXchgInst *AI = dyn_cast(&I)) { + Or = getBoundsCheckCond(AI->getPointerOperand(), AI->getCompareOperand(), + DL, TLI, ObjSizeEval, IRB, SE); + } else if (AtomicRMWInst *AI = dyn_cast(&I)) { + Or = getBoundsCheckCond(AI->getPointerOperand(), AI->getValOperand(), DL, + TLI, ObjSizeEval, IRB, SE); + } + if (Or) + TrapInfo.push_back(std::make_pair(&I, Or)); } // Create a trapping basic block on demand using a callback. Depending on @@ -176,29 +195,14 @@ static bool addBoundsChecking(Function &F, TargetLibra return TrapBB; }; - bool MadeChange = false; - for (Instruction *Inst : WorkList) { + // Add the checks. + for (const auto &Entry : TrapInfo) { + Instruction *Inst = Entry.first; BuilderTy IRB(Inst->getParent(), BasicBlock::iterator(Inst), TargetFolder(DL)); - if (LoadInst *LI = dyn_cast(Inst)) { - MadeChange |= instrumentMemAccess(LI->getPointerOperand(), LI, DL, TLI, - ObjSizeEval, IRB, GetTrapBB, SE); - } else if (StoreInst *SI = dyn_cast(Inst)) { - MadeChange |= - instrumentMemAccess(SI->getPointerOperand(), SI->getValueOperand(), - DL, TLI, ObjSizeEval, IRB, GetTrapBB, SE); - } else if (AtomicCmpXchgInst *AI = dyn_cast(Inst)) { - MadeChange |= - instrumentMemAccess(AI->getPointerOperand(), AI->getCompareOperand(), - DL, TLI, ObjSizeEval, IRB, GetTrapBB, SE); - } else if (AtomicRMWInst *AI = dyn_cast(Inst)) { - MadeChange |= - instrumentMemAccess(AI->getPointerOperand(), AI->getValOperand(), DL, - TLI, ObjSizeEval, IRB, GetTrapBB, SE); - } else { - llvm_unreachable("unknown Instruction type"); - } + insertBoundsCheck(Entry.second, IRB, GetTrapBB); } - return MadeChange; + + return !TrapInfo.empty(); } PreservedAnalyses BoundsCheckingPass::run(Function &F, FunctionAnalysisManager &AM) { Modified: vendor/llvm/dist-release_70/test/CodeGen/AArch64/fcopysign.ll ============================================================================== --- vendor/llvm/dist-release_70/test/CodeGen/AArch64/fcopysign.ll Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/test/CodeGen/AArch64/fcopysign.ll Sat Aug 11 16:29:25 2018 (r337631) @@ -5,10 +5,12 @@ target triple = "aarch64--" declare fp128 @llvm.copysign.f128(fp128, fp128) -@val = global double zeroinitializer, align 8 +@val_float = global float zeroinitializer, align 4 +@val_double = global double zeroinitializer, align 8 +@val_fp128 = global fp128 zeroinitializer, align 16 ; CHECK-LABEL: copysign0 -; CHECK: ldr [[REG:x[0-9]+]], [x8, :lo12:val] +; CHECK: ldr [[REG:x[0-9]+]], [x8, :lo12:val_double] ; CHECK: and [[ANDREG:x[0-9]+]], [[REG]], #0x8000000000000000 ; CHECK: lsr x[[LSRREGNUM:[0-9]+]], [[ANDREG]], #56 ; CHECK: bfxil w[[LSRREGNUM]], w{{[0-9]+}}, #0, #7 @@ -16,8 +18,25 @@ declare fp128 @llvm.copysign.f128(fp128, fp128) ; CHECK: ldr q{{[0-9]+}}, define fp128 @copysign0() { entry: - %v = load double, double* @val, align 8 + %v = load double, double* @val_double, align 8 %conv = fpext double %v to fp128 %call = tail call fp128 @llvm.copysign.f128(fp128 0xL00000000000000007FFF000000000000, fp128 %conv) #2 + ret fp128 %call +} + +; CHECK-LABEL: copysign1 +; CHECK-DAG: ldr [[REG:q[0-9]+]], [x8, :lo12:val_fp128] +; CHECK-DAG: ldr [[REG:w[0-9]+]], [x8, :lo12:val_float] +; CHECK: and [[ANDREG:w[0-9]+]], [[REG]], #0x80000000 +; CHECK: lsr w[[LSRREGNUM:[0-9]+]], [[ANDREG]], #24 +; CHECK: bfxil w[[LSRREGNUM]], w{{[0-9]+}}, #0, #7 +; CHECK: strb w[[LSRREGNUM]], +; CHECK: ldr q{{[0-9]+}}, +define fp128@copysign1() { +entry: + %v0 = load fp128, fp128* @val_fp128, align 16 + %v1 = load float, float* @val_float, align 4 + %conv = fpext float %v1 to fp128 + %call = tail call fp128 @llvm.copysign.f128(fp128 %v0, fp128 %conv) ret fp128 %call } Modified: vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/kernel-args.ll ============================================================================== --- vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/kernel-args.ll Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/kernel-args.ll Sat Aug 11 16:29:25 2018 (r337631) @@ -16,13 +16,8 @@ ; HSA-VI: s_and_b32 s{{[0-9]+}}, [[VAL]], 0xff -; EG: LSHR T0.X, KC0[2].Y, literal.x, -; EG-NEXT: MOV * T1.X, KC0[2].Z, -; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) - -; CM: LSHR * T0.X, KC0[2].Y, literal.x, -; CM-NEXT: 2(2.802597e-45), 0(0.000000e+00) -; CM-NEXT: MOV * T1.X, KC0[2].Z, +; EGCM: VTX_READ_8{{.*}} #3 +; EGCM: KC0[2].Y define amdgpu_kernel void @i8_arg(i32 addrspace(1)* nocapture %out, i8 %in) nounwind { %ext = zext i8 %in to i32 store i32 %ext, i32 addrspace(1)* %out, align 4 @@ -92,14 +87,8 @@ define amdgpu_kernel void @i8_sext_arg(i32 addrspace(1 ; HSA-VI: s_and_b32 s{{[0-9]+}}, [[VAL]], 0xffff{{$}} ; HSA-VI: flat_store_dword - -; EG: LSHR T0.X, KC0[2].Y, literal.x, -; EG-NEXT: MOV * T1.X, KC0[2].Z, -; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) - -; CM: LSHR * T0.X, KC0[2].Y, literal.x, -; CM-NEXT: 2(2.802597e-45), 0(0.000000e+00) -; CM-NEXT: MOV * T1.X, KC0[2].Z, +; EGCM: VTX_READ_16 +; EGCM: KC0[2].Y define amdgpu_kernel void @i16_arg(i32 addrspace(1)* nocapture %out, i16 %in) nounwind { %ext = zext i16 %in to i32 store i32 %ext, i32 addrspace(1)* %out, align 4 Modified: vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/mad_uint24.ll ============================================================================== --- vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/mad_uint24.ll Sat Aug 11 16:12:23 2018 (r337630) +++ vendor/llvm/dist-release_70/test/CodeGen/AMDGPU/mad_uint24.ll Sat Aug 11 16:29:25 2018 (r337631) @@ -1,8 +1,8 @@ ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=EG --check-prefix=FUNC ; RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck %s --check-prefix=EG --check-prefix=FUNC -; RUN: llc < %s -march=amdgcn -verify-machineinstrs | FileCheck %s --check-prefix=SI --check-prefix=FUNC -; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefix=VI --check-prefix=FUNC -; RUN: llc < %s -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefix=VI --check-prefix=FUNC +; RUN: llc < %s -march=amdgcn -verify-machineinstrs | FileCheck %s --check-prefix=SI --check-prefix=FUNC --check-prefix=GCN +; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefix=VI --check-prefix=FUNC --check-prefix=GCN +; RUN: llc < %s -march=amdgcn -mcpu=fiji -mattr=-flat-for-global -verify-machineinstrs | FileCheck %s --check-prefix=VI --check-prefix=FUNC --check-prefix=GCN declare i32 @llvm.r600.read.tidig.x() nounwind readnone @@ -136,5 +136,92 @@ bb4: ; pr bb18: ; preds = %bb4 store i32 %tmp16, i32 addrspace(1)* %arg + ret void +} + +; FUNC-LABEL: {{^}}i8_mad_sat_16: +; EG: MULADD_UINT24 {{[* ]*}}T{{[0-9]}}.[[MAD_CHAN:[XYZW]]] +; The result must be sign-extended +; EG: BFE_INT {{[* ]*}}T{{[0-9]\.[XYZW]}}, PV.[[MAD_CHAN]], 0.0, literal.x +; EG: 8 +; SI: v_mad_u32_u24 [[MAD:v[0-9]]], {{[sv][0-9], [sv][0-9]}} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Aug 11 16:29:33 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37D111072637; Sat, 11 Aug 2018 16:29:33 +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 DCD8185F92; Sat, 11 Aug 2018 16:29:32 +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 A5E6D19ABD; Sat, 11 Aug 2018 16:29:32 +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 w7BGTW6H019985; Sat, 11 Aug 2018 16:29:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGTW20019984; Sat, 11 Aug 2018 16:29:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808111629.w7BGTW20019984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Aug 2018 16:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337632 - vendor/llvm/llvm-release_70-r339355 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_70-r339355 X-SVN-Commit-Revision: 337632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:29:33 -0000 Author: dim Date: Sat Aug 11 16:29:32 2018 New Revision: 337632 URL: https://svnweb.freebsd.org/changeset/base/337632 Log: Tag llvm release_70 branch r339355. Added: vendor/llvm/llvm-release_70-r339355/ - copied from r337631, vendor/llvm/dist-release_70/ From owner-svn-src-vendor@freebsd.org Sat Aug 11 16:29:43 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D97301072689; Sat, 11 Aug 2018 16:29:43 +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 6875386150; Sat, 11 Aug 2018 16:29:42 +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 A232219AC0; Sat, 11 Aug 2018 16:29:42 +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 w7BGTguH020096; Sat, 11 Aug 2018 16:29:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGTgnM020095; Sat, 11 Aug 2018 16:29:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808111629.w7BGTgnM020095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Aug 2018 16:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337634 - vendor/clang/clang-release_70-r339355 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_70-r339355 X-SVN-Commit-Revision: 337634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:29:44 -0000 Author: dim Date: Sat Aug 11 16:29:42 2018 New Revision: 337634 URL: https://svnweb.freebsd.org/changeset/base/337634 Log: Tag clang release_70 branch r339355. Added: vendor/clang/clang-release_70-r339355/ - copied from r337633, vendor/clang/dist-release_70/ From owner-svn-src-vendor@freebsd.org Sat Aug 11 16:29:44 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D58571072688; Sat, 11 Aug 2018 16:29:43 +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 CBC9E860AA; Sat, 11 Aug 2018 16:29:39 +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 5662019ABF; Sat, 11 Aug 2018 16:29:39 +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 w7BGTdJU020047; Sat, 11 Aug 2018 16:29:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGTaAG020033; Sat, 11 Aug 2018 16:29:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808111629.w7BGTaAG020033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 11 Aug 2018 16:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r337633 - in vendor/clang/dist-release_70: docs lib/CodeGen lib/Headers lib/Sema test test/CodeGen test/SemaCXX www X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_70: docs lib/CodeGen lib/Headers lib/Sema test test/CodeGen test/SemaCXX www X-SVN-Commit-Revision: 337633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:29:44 -0000 Author: dim Date: Sat Aug 11 16:29:35 2018 New Revision: 337633 URL: https://svnweb.freebsd.org/changeset/base/337633 Log: Vendor import of clang release_70 branch r339355: https://llvm.org/svn/llvm-project/cfe/branches/release_70@339355 Added: vendor/clang/dist-release_70/test/CodeGen/global-blocks-win32.c (contents, props changed) Modified: vendor/clang/dist-release_70/docs/AddressSanitizer.rst vendor/clang/dist-release_70/docs/MemorySanitizer.rst vendor/clang/dist-release_70/docs/ReleaseNotes.rst vendor/clang/dist-release_70/lib/CodeGen/CGBlocks.cpp vendor/clang/dist-release_70/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist-release_70/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist-release_70/lib/Headers/unwind.h vendor/clang/dist-release_70/lib/Sema/SemaExprCXX.cpp vendor/clang/dist-release_70/test/SemaCXX/constructor.cpp vendor/clang/dist-release_70/test/lit.cfg.py vendor/clang/dist-release_70/www/cxx_dr_status.html vendor/clang/dist-release_70/www/cxx_status.html vendor/clang/dist-release_70/www/make_cxx_dr_status Modified: vendor/clang/dist-release_70/docs/AddressSanitizer.rst ============================================================================== --- vendor/clang/dist-release_70/docs/AddressSanitizer.rst Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/docs/AddressSanitizer.rst Sat Aug 11 16:29:35 2018 (r337633) @@ -144,6 +144,12 @@ For more information on leak detector in AddressSaniti and can be enabled using ``ASAN_OPTIONS=detect_leaks=1`` on OS X; however, it is not yet supported on other platforms. +Writable/Executable paging detection +------------------------------------ + +The W^X detection is disabled by default and can be enabled using +``ASAN_OPTIONS=detect_write_exec=1``. + Issue Suppression ================= Modified: vendor/clang/dist-release_70/docs/MemorySanitizer.rst ============================================================================== --- vendor/clang/dist-release_70/docs/MemorySanitizer.rst Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/docs/MemorySanitizer.rst Sat Aug 11 16:29:35 2018 (r337633) @@ -165,6 +165,13 @@ to: #. Set environment variable `MSAN_OPTIONS=poison_in_dtor=1` before running the program. +Writable/Executable paging detection +==================================== + +You can eable writable-executable page detection in MemorySanitizer by +setting the environment variable `MSAN_OPTIONS=detect_write_exec=1` before +running the program. + Handling external code ====================== Modified: vendor/clang/dist-release_70/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist-release_70/docs/ReleaseNotes.rst Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/docs/ReleaseNotes.rst Sat Aug 11 16:29:35 2018 (r337633) @@ -284,7 +284,8 @@ libclang Static Analyzer --------------- -- ... +- The new `MmapWriteExec` checker had been introduced to detect attempts to map pages +both writable and executable. ... Modified: vendor/clang/dist-release_70/lib/CodeGen/CGBlocks.cpp ============================================================================== --- vendor/clang/dist-release_70/lib/CodeGen/CGBlocks.cpp Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/lib/CodeGen/CGBlocks.cpp Sat Aug 11 16:29:35 2018 (r337633) @@ -1213,9 +1213,13 @@ static llvm::Constant *buildGlobalBlock(CodeGenModule auto fields = builder.beginStruct(); bool IsOpenCL = CGM.getLangOpts().OpenCL; + bool IsWindows = CGM.getTarget().getTriple().isOSWindows(); if (!IsOpenCL) { // isa - fields.add(CGM.getNSConcreteGlobalBlock()); + if (IsWindows) + fields.addNullPointer(CGM.Int8PtrPtrTy); + else + fields.add(CGM.getNSConcreteGlobalBlock()); // __flags BlockFlags flags = BLOCK_IS_GLOBAL | BLOCK_HAS_SIGNATURE; @@ -1250,7 +1254,27 @@ static llvm::Constant *buildGlobalBlock(CodeGenModule llvm::Constant *literal = fields.finishAndCreateGlobal( "__block_literal_global", blockInfo.BlockAlign, - /*constant*/ true, llvm::GlobalVariable::InternalLinkage, AddrSpace); + /*constant*/ !IsWindows, llvm::GlobalVariable::InternalLinkage, AddrSpace); + + // Windows does not allow globals to be initialised to point to globals in + // different DLLs. Any such variables must run code to initialise them. + if (IsWindows) { + auto *Init = llvm::Function::Create(llvm::FunctionType::get(CGM.VoidTy, + {}), llvm::GlobalValue::InternalLinkage, ".block_isa_init", + &CGM.getModule()); + llvm::IRBuilder<> b(llvm::BasicBlock::Create(CGM.getLLVMContext(), "entry", + Init)); + b.CreateAlignedStore(CGM.getNSConcreteGlobalBlock(), + b.CreateStructGEP(literal, 0), CGM.getPointerAlign().getQuantity()); + b.CreateRetVoid(); + // We can't use the normal LLVM global initialisation array, because we + // need to specify that this runs early in library initialisation. + auto *InitVar = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), + /*isConstant*/true, llvm::GlobalValue::InternalLinkage, + Init, ".block_isa_init_ptr"); + InitVar->setSection(".CRT$XCLa"); + CGM.addUsedGlobal(InitVar); + } // Return a constant of the appropriately-casted type. llvm::Type *RequiredType = Modified: vendor/clang/dist-release_70/lib/CodeGen/CGObjCGNU.cpp ============================================================================== --- vendor/clang/dist-release_70/lib/CodeGen/CGObjCGNU.cpp Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/lib/CodeGen/CGObjCGNU.cpp Sat Aug 11 16:29:35 2018 (r337633) @@ -3812,40 +3812,10 @@ llvm::GlobalVariable *CGObjCGNU::ObjCIvarOffsetVariabl // is. This allows code compiled with non-fragile ivars to work correctly // when linked against code which isn't (most of the time). llvm::GlobalVariable *IvarOffsetPointer = TheModule.getNamedGlobal(Name); - if (!IvarOffsetPointer) { - // This will cause a run-time crash if we accidentally use it. A value of - // 0 would seem more sensible, but will silently overwrite the isa pointer - // causing a great deal of confusion. - uint64_t Offset = -1; - // We can't call ComputeIvarBaseOffset() here if we have the - // implementation, because it will create an invalid ASTRecordLayout object - // that we are then stuck with forever, so we only initialize the ivar - // offset variable with a guess if we only have the interface. The - // initializer will be reset later anyway, when we are generating the class - // description. - if (!CGM.getContext().getObjCImplementation( - const_cast(ID))) - Offset = ComputeIvarBaseOffset(CGM, ID, Ivar); - - llvm::ConstantInt *OffsetGuess = llvm::ConstantInt::get(Int32Ty, Offset, - /*isSigned*/true); - // Don't emit the guess in non-PIC code because the linker will not be able - // to replace it with the real version for a library. In non-PIC code you - // must compile with the fragile ABI if you want to use ivars from a - // GCC-compiled class. - if (CGM.getLangOpts().PICLevel) { - llvm::GlobalVariable *IvarOffsetGV = new llvm::GlobalVariable(TheModule, - Int32Ty, false, - llvm::GlobalValue::PrivateLinkage, OffsetGuess, Name+".guess"); - IvarOffsetPointer = new llvm::GlobalVariable(TheModule, - IvarOffsetGV->getType(), false, llvm::GlobalValue::LinkOnceAnyLinkage, - IvarOffsetGV, Name); - } else { - IvarOffsetPointer = new llvm::GlobalVariable(TheModule, - llvm::Type::getInt32PtrTy(VMContext), false, - llvm::GlobalValue::ExternalLinkage, nullptr, Name); - } - } + if (!IvarOffsetPointer) + IvarOffsetPointer = new llvm::GlobalVariable(TheModule, + llvm::Type::getInt32PtrTy(VMContext), false, + llvm::GlobalValue::ExternalLinkage, nullptr, Name); return IvarOffsetPointer; } Modified: vendor/clang/dist-release_70/lib/CodeGen/CodeGenAction.cpp ============================================================================== --- vendor/clang/dist-release_70/lib/CodeGen/CodeGenAction.cpp Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/lib/CodeGen/CodeGenAction.cpp Sat Aug 11 16:29:35 2018 (r337633) @@ -127,6 +127,7 @@ namespace clang { CodeGenOpts, C, CoverageInfo)), LinkModules(std::move(LinkModules)) { FrontendTimesIsEnabled = TimePasses; + llvm::TimePassesIsEnabled = TimePasses; } llvm::Module *getModule() const { return Gen->GetModule(); } std::unique_ptr takeModule() { Modified: vendor/clang/dist-release_70/lib/Headers/unwind.h ============================================================================== --- vendor/clang/dist-release_70/lib/Headers/unwind.h Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/lib/Headers/unwind.h Sat Aug 11 16:29:35 2018 (r337633) @@ -154,8 +154,12 @@ struct _Unwind_Control_Block { struct _Unwind_Exception { _Unwind_Exception_Class exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; +#if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__) + _Unwind_Word private_[6]; +#else _Unwind_Word private_1; _Unwind_Word private_2; +#endif /* The Itanium ABI requires that _Unwind_Exception objects are "double-word * aligned". GCC has interpreted this to mean "use the maximum useful * alignment for the target"; so do we. */ Modified: vendor/clang/dist-release_70/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist-release_70/lib/Sema/SemaExprCXX.cpp Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/lib/Sema/SemaExprCXX.cpp Sat Aug 11 16:29:35 2018 (r337633) @@ -113,9 +113,15 @@ ParsedType Sema::getConstructorName(IdentifierInfo &II break; } } - if (!InjectedClassName && CurClass->isInvalidDecl()) + if (!InjectedClassName) { + if (!CurClass->isInvalidDecl()) { + // FIXME: RequireCompleteDeclContext doesn't check dependent contexts + // properly. Work around it here for now. + Diag(SS.getLastQualifierNameLoc(), + diag::err_incomplete_nested_name_spec) << CurClass << SS.getRange(); + } return ParsedType(); - assert(InjectedClassName && "couldn't find injected class name"); + } QualType T = Context.getTypeDeclType(InjectedClassName); DiagnoseUseOfDecl(InjectedClassName, NameLoc); Added: vendor/clang/dist-release_70/test/CodeGen/global-blocks-win32.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist-release_70/test/CodeGen/global-blocks-win32.c Sat Aug 11 16:29:35 2018 (r337633) @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -fblocks -triple i386-pc-windows-msvc %s -emit-llvm -o - -fblocks | FileCheck %s + + +int (^x)(void) = ^() { return 21; }; + + +// Check that the block literal is emitted with a null isa pointer +// CHECK: @__block_literal_global = internal global { i8**, i32, i32, i8*, %struct.__block_descriptor* } { i8** null, + +// Check that _NSConcreteGlobalBlock has the correct dllimport specifier. +// CHECK: @_NSConcreteGlobalBlock = external dllimport global i8* +// Check that we create an initialiser pointer in the correct section (early library initialisation). +// CHECK: @.block_isa_init_ptr = internal constant void ()* @.block_isa_init, section ".CRT$XCLa" + +// Check that we emit an initialiser for it. +// CHECK: define internal void @.block_isa_init() { +// CHECK: store i8** @_NSConcreteGlobalBlock, i8*** getelementptr inbounds ({ i8**, i32, i32, i8*, %struct.__block_descriptor* }, { i8**, i32, i32, i8*, %struct.__block_descriptor* }* @__block_literal_global, i32 0, i32 0), align 4 + Modified: vendor/clang/dist-release_70/test/SemaCXX/constructor.cpp ============================================================================== --- vendor/clang/dist-release_70/test/SemaCXX/constructor.cpp Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/test/SemaCXX/constructor.cpp Sat Aug 11 16:29:35 2018 (r337633) @@ -86,3 +86,14 @@ A::S::operator int() { return 1; } A::S::~S() {} +namespace PR38286 { + // FIXME: It'd be nice to give more consistent diagnostics for these cases + // (but they're all failing for somewhat different reasons...). + template struct A; + template A::A() {} // expected-error {{incomplete type 'A' named in nested name specifier}} + /*FIXME: needed to recover properly from previous error*/; + template struct B; + template void B::f() {} // expected-error {{out-of-line definition of 'f' from class 'B'}} + template struct C; + template C::~C() {} // expected-error {{no type named 'C' in 'C'}} +} Modified: vendor/clang/dist-release_70/test/lit.cfg.py ============================================================================== --- vendor/clang/dist-release_70/test/lit.cfg.py Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/test/lit.cfg.py Sat Aug 11 16:29:35 2018 (r337633) @@ -71,7 +71,7 @@ llvm_config.add_tool_substitutions(tools, tool_dirs) config.substitutions.append( ('%hmaptool', "'%s' %s" % (config.python_executable, - os.path.join(config.llvm_tools_dir, 'hmaptool')))) + os.path.join(config.clang_tools_dir, 'hmaptool')))) # Plugins (loadable modules) # TODO: This should be supplied by Makefile or autoconf. Modified: vendor/clang/dist-release_70/www/cxx_dr_status.html ============================================================================== --- vendor/clang/dist-release_70/www/cxx_dr_status.html Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/www/cxx_dr_status.html Sat Aug 11 16:29:35 2018 (r337633) @@ -28,7 +28,7 @@

          C++ Defect Report Support in Clang

          -

          Last updated: $Date: 2018-07-27 06:41:37 +0200 (Fri, 27 Jul 2018) $

          +

          Last updated: $Date: 2018-08-06 12:32:02 +0200 (Mon, 06 Aug 2018) $

          C++ defect report implementation status

          @@ -2021,7 +2021,7 @@ of class templates 330 CD4 Qualification conversions and pointers to arrays of pointers - SVN + Clang 7 331 @@ -7093,7 +7093,7 @@ and POD class 1213 CD3 Array subscripting and xvalues - SVN + Clang 7 1214 @@ -9847,7 +9847,7 @@ and POD class 1672 CD4 Layout compatibility with multiple empty bases - SVN + Clang 7 1673 @@ -9937,7 +9937,7 @@ and POD class 1687 C++14 Conversions of operands of built-in operators - SVN + Clang 7 1688 @@ -9991,7 +9991,7 @@ and POD class 1696 CD4 Temporary lifetime and non-static data member initializers - SVN + Clang 7 1697 @@ -10693,7 +10693,7 @@ and POD class 1813 CD4 Direct vs indirect bases in standard-layout classes - SVN + Clang 7 1814 @@ -11101,7 +11101,7 @@ and POD class 1881 CD4 Standard-layout classes and unnamed bit-fields - SVN + Clang 7 1882 @@ -12535,7 +12535,7 @@ and POD class 2120 CD4 Array as first non-static data member in standard-layout class - SVN + Clang 7 2121 @@ -13189,7 +13189,7 @@ and POD class 2229 tentatively ready Volatile unnamed bit-fields - SVN + Clang 7 2230 Modified: vendor/clang/dist-release_70/www/cxx_status.html ============================================================================== --- vendor/clang/dist-release_70/www/cxx_status.html Sat Aug 11 16:29:32 2018 (r337632) +++ vendor/clang/dist-release_70/www/cxx_status.html Sat Aug 11 16:29:35 2018 (r337633) @@ -26,7 +26,7 @@

          C++ Support in Clang

          -

          Last updated: $Date: 2018-07-27 06:41:37 +0200 (Fri, 27 Jul 2018) $

          +

          Last updated: $Date: 2018-08-06 12:32:02 +0200 (Mon, 06 Aug 2018) $

          Clang fully implements all published ISO C++ standards (C++98 / C++03, P0620R0 (DR) - SVN + Clang 7 @@ -1026,7 +1026,7 @@ and library features that are not part of standard C++ - SVN (P0096R5) + Clang 7 (P0096R5)