From owner-svn-src-head@FreeBSD.ORG Fri Apr 9 15:21:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C34106564A; Fri, 9 Apr 2010 15:21:11 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAC768FC14; Fri, 9 Apr 2010 15:21:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39FLBIG035861; Fri, 9 Apr 2010 15:21:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39FLBqx035856; Fri, 9 Apr 2010 15:21:11 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004091521.o39FLBqx035856@svn.freebsd.org> From: Roman Divacky Date: Fri, 9 Apr 2010 15:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206424 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 15:21:11 -0000 Author: rdivacky Date: Fri Apr 9 15:21:11 2010 New Revision: 206424 URL: http://svn.freebsd.org/changeset/base/206424 Log: Rename the ALIGN macro to LINT_ALIGN so it does not clash with machine/param.h Bump the alignment to 16bytes because lint1 memory allocator is used for objects that require 16bytes alignment on amd64 (ie. val_t). This makes lint1 work when compiled with compiler(s) that use SSE for memcpy on amd64. (e.g. clang). Approved by: ed (mentor) Modified: head/usr.bin/xlint/lint1/decl.c head/usr.bin/xlint/lint1/lint1.h head/usr.bin/xlint/lint1/mem1.c Modified: head/usr.bin/xlint/lint1/decl.c ============================================================================== --- head/usr.bin/xlint/lint1/decl.c Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/decl.c Fri Apr 9 15:21:11 2010 (r206424) @@ -825,15 +825,15 @@ getbound(type_t *tp) } else if (t == FUNC) { /* compiler takes alignment of function */ error(14); - a = ALIGN(1) * CHAR_BIT; + a = LINT_ALIGN(1) * CHAR_BIT; } else { if ((a = size(t)) == 0) { a = CHAR_BIT; - } else if (a > ALIGN(1) * CHAR_BIT) { - a = ALIGN(1) * CHAR_BIT; + } else if (a > LINT_ALIGN(1) * CHAR_BIT) { + a = LINT_ALIGN(1) * CHAR_BIT; } } - if (a < CHAR_BIT || a > ALIGN(1) * CHAR_BIT) + if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) lerror("getbound() 1"); return (a); } Modified: head/usr.bin/xlint/lint1/lint1.h ============================================================================== --- head/usr.bin/xlint/lint1/lint1.h Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/lint1.h Fri Apr 9 15:21:11 2010 (r206424) @@ -38,8 +38,8 @@ __FBSDID("$FreeBSD$"); #include "op.h" /* XXX - works for most systems, but the whole ALIGN thing needs to go away */ -#ifndef ALIGN -#define ALIGN(x) (((x) + 7) & ~7) +#ifndef LINT_ALIGN +#define LINT_ALIGN(x) (((x) + 15) & ~15) #endif /* Modified: head/usr.bin/xlint/lint1/mem1.c ============================================================================== --- head/usr.bin/xlint/lint1/mem1.c Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/mem1.c Fri Apr 9 15:21:11 2010 (r206424) @@ -203,7 +203,7 @@ xgetblk(mbl_t **mbp, size_t s) void *p; size_t t = 0; - s = ALIGN(s); + s = LINT_ALIGN(s); if ((mb = *mbp) == NULL || mb->nfree < s) { if ((mb = frmblks) == NULL) { if (s > mblklen) {