aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/tree.h
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2013-11-29 18:46:02 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2013-11-29 18:46:02 +0000
commit5b1674597f691bf76412c619db408719169a04be (patch)
tree16aa550f2d0b9c92a10cd8ebe3e804bcc566d5e0 /contrib/gcc/tree.h
parentf77ffe1b227bce1b991c7b175595548743517a1c (diff)
downloadsrc-5b1674597f691bf76412c619db408719169a04be.tar.gz
src-5b1674597f691bf76412c619db408719169a04be.zip
gcc: upstream alignment cleanups.
This solves GCC/32617 and contributes to reduce differences with Apple's gcc42. Complete some references in the ChangeLog while here. Obtained from: gcc 4.3 (rev. 126529, 126588; GPLv2) MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=258748
Diffstat (limited to 'contrib/gcc/tree.h')
-rw-r--r--contrib/gcc/tree.h36
1 files changed, 14 insertions, 22 deletions
diff --git a/contrib/gcc/tree.h b/contrib/gcc/tree.h
index c502182eba39..6cfc3d375ccb 100644
--- a/contrib/gcc/tree.h
+++ b/contrib/gcc/tree.h
@@ -2426,13 +2426,11 @@ struct tree_struct_field_tag GTY(())
/* Likewise for the size in bytes. */
#define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
/* Holds the alignment required for the datum, in bits. */
-#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align)
+#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align)
/* The alignment of NODE, in bytes. */
#define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
-/* For FIELD_DECLs, off_align holds the number of low-order bits of
- DECL_FIELD_OFFSET which are known to be always zero.
- DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET
- has. */
+/* Set if the alignment of this DECL has been set by the user, for
+ example with an 'aligned' attribute. */
#define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align)
/* Holds the machine mode corresponding to the declaration of a variable or
field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
@@ -2443,7 +2441,8 @@ struct tree_struct_field_tag GTY(())
operation it is. Note, however, that this field is overloaded, with
DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be
checked before any access to the former. */
-#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_common.u1.f)
+#define DECL_FUNCTION_CODE(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code)
#define DECL_DEBUG_EXPR_IS_FROM(NODE) \
(DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
@@ -2581,20 +2580,9 @@ struct tree_decl_common GTY(())
unsigned gimple_reg_flag : 1;
unsigned call_clobbered_flag : 1;
- union tree_decl_u1 {
- /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
- DECL_FUNCTION_CODE. */
- enum built_in_function f;
- /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this
- is used by language-dependent code. */
- HOST_WIDE_INT i;
- /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for
- FUNCTION_DECLs). */
- struct tree_decl_u1_a {
- unsigned int align : 24;
- unsigned int off_align : 8;
- } a;
- } GTY ((skip)) u1;
+ unsigned int align : 24;
+ /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
+ unsigned int off_align : 8;
tree size_unit;
tree initial;
@@ -2679,11 +2667,11 @@ struct tree_decl_with_rtl GTY(())
DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET
has. */
#define DECL_OFFSET_ALIGN(NODE) \
- (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align)
+ (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align)
/* Specify that DECL_ALIGN(NODE) is a multiple of X. */
#define SET_DECL_OFFSET_ALIGN(NODE, X) \
- (FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align = exact_log2 ((X) & -(X)))
+ (FIELD_DECL_CHECK (NODE)->decl_common.off_align = exact_log2 ((X) & -(X)))
/* 1 if the alignment for this type was requested by "aligned" attribute,
0 if it is the default for this type. */
@@ -3096,6 +3084,10 @@ struct tree_function_decl GTY(())
{
struct tree_decl_non_common common;
+ /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
+ DECL_FUNCTION_CODE. Otherwise unused. */
+ enum built_in_function function_code;
+
unsigned static_ctor_flag : 1;
unsigned static_dtor_flag : 1;
unsigned uninlinable : 1;