aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2016-03-15 03:20:24 +0000
committerIan Lepore <ian@FreeBSD.org>2016-03-15 03:20:24 +0000
commit08ff8965e72f966e9facdaa8095008d77fa33507 (patch)
tree6576b13a3368114950e9cfdb6675d8db8699400e
parentbc83d146ec4389a66701766b16f4ff0f8d87a7bc (diff)
downloadsrc-08ff8965e72f966e9facdaa8095008d77fa33507.tar.gz
src-08ff8965e72f966e9facdaa8095008d77fa33507.zip
MFC r206424: (by rdivacky in 2010)
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). This allows me to compile stable-8 on a 64-bit build host running 10-stable, without dying during the xlint build. It should work fine on 11-current too.
Notes
Notes: svn path=/stable/8/; revision=296887
-rw-r--r--usr.bin/xlint/lint1/decl.c8
-rw-r--r--usr.bin/xlint/lint1/lint1.h4
-rw-r--r--usr.bin/xlint/lint1/mem1.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c
index 69c7cda53775..41492cf26ae7 100644
--- a/usr.bin/xlint/lint1/decl.c
+++ b/usr.bin/xlint/lint1/decl.c
@@ -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);
}
diff --git a/usr.bin/xlint/lint1/lint1.h b/usr.bin/xlint/lint1/lint1.h
index fe1a524b98f5..6cfcbb747d2e 100644
--- a/usr.bin/xlint/lint1/lint1.h
+++ b/usr.bin/xlint/lint1/lint1.h
@@ -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
/*
diff --git a/usr.bin/xlint/lint1/mem1.c b/usr.bin/xlint/lint1/mem1.c
index 24e911e8cdfb..280a63c91d99 100644
--- a/usr.bin/xlint/lint1/mem1.c
+++ b/usr.bin/xlint/lint1/mem1.c
@@ -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) {