From 8859dc9e6d56e1d0f1d4eb4302a360899ec17c7d Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 9 Oct 2016 02:41:34 +0200 Subject: Support large alignment requests The linux kernel has some structures that are page aligned, i.e. 4096. Instead of enlarging the bit fields to specify this, use the fact that alignment is always power of two, and store only the log2 minus 1 of it. The 5 bits are enough to specify an alignment of 1 << 30. --- tcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 7630f4c..9b65e6d 100644 --- a/tcc.h +++ b/tcc.h @@ -379,7 +379,7 @@ typedef struct SValue { struct Attribute { unsigned func_call : 3, /* calling convention (0..5), see below */ - aligned : 5, /* alignement (0..16) */ + aligned : 5, /* alignment as log2+1 (0 == unspecified) */ packed : 1, func_export : 1, func_import : 1, -- cgit v1.3.1