diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2015-08-21 01:15:33 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2015-08-21 01:15:33 +0000 |
commit | 6b00e42da3a26fae6f878e3b83baffbda7f79227 (patch) | |
tree | 622d454a1868dda05940920cea5067868cc30c82 /gcc/varasm.c | |
parent | 70b0dcce28f993b2d6fcf7851bc8aadc7b60c38d (diff) | |
download | gcc-6b00e42da3a26fae6f878e3b83baffbda7f79227.zip gcc-6b00e42da3a26fae6f878e3b83baffbda7f79227.tar.gz gcc-6b00e42da3a26fae6f878e3b83baffbda7f79227.tar.bz2 |
add default for CONSTANT_ALIGNMENT
gcc/ChangeLog:
2015-08-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* defaults.h (CONSTANT_ALIGNMENT): New macro definition.
* builtins.c (get_object_alignment_2): Adjust.
* varasm.c (align_variable): Likewise.
(get_variable_align): Likewise.
(build_constant_desc): Likewise.
(force_const_mem): Likewise.
* doc/tm.texi.in: Likewise.
* doc/tm.texi: Regenerate.
From-SVN: r227052
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 2ebac89..7fa2e7b 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1043,7 +1043,6 @@ align_variable (tree decl, bool dont_output_data) if (! DECL_THREAD_LOCAL_P (decl) || data_align <= BITS_PER_WORD) align = data_align; #endif -#ifdef CONSTANT_ALIGNMENT if (DECL_INITIAL (decl) != 0 /* In LTO we have no errors in program; error_mark_node is used to mark offlined constructors. */ @@ -1056,7 +1055,6 @@ align_variable (tree decl, bool dont_output_data) if (! DECL_THREAD_LOCAL_P (decl) || const_align <= BITS_PER_WORD) align = const_align; } -#endif } } @@ -1097,7 +1095,6 @@ get_variable_align (tree decl) if (! DECL_THREAD_LOCAL_P (decl) || data_align <= BITS_PER_WORD) align = data_align; #endif -#ifdef CONSTANT_ALIGNMENT if (DECL_INITIAL (decl) != 0 /* In LTO we have no errors in program; error_mark_node is used to mark offlined constructors. */ @@ -1110,7 +1107,6 @@ get_variable_align (tree decl) if (! DECL_THREAD_LOCAL_P (decl) || const_align <= BITS_PER_WORD) align = const_align; } -#endif } return align; @@ -3286,9 +3282,7 @@ build_constant_desc (tree exp) architectures so use DATA_ALIGNMENT as well, except for strings. */ if (TREE_CODE (exp) == STRING_CST) { -#ifdef CONSTANT_ALIGNMENT DECL_ALIGN (decl) = CONSTANT_ALIGNMENT (exp, DECL_ALIGN (decl)); -#endif } else align_variable (decl, 0); @@ -3743,13 +3737,10 @@ force_const_mem (machine_mode mode, rtx x) /* Align the location counter as required by EXP's data type. */ align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode); -#ifdef CONSTANT_ALIGNMENT - { - tree type = lang_hooks.types.type_for_mode (mode, 0); - if (type != NULL_TREE) - align = CONSTANT_ALIGNMENT (make_tree (type, x), align); - } -#endif + + tree type = lang_hooks.types.type_for_mode (mode, 0); + if (type != NULL_TREE) + align = CONSTANT_ALIGNMENT (make_tree (type, x), align); pool->offset += (align / BITS_PER_UNIT) - 1; pool->offset &= ~ ((align / BITS_PER_UNIT) - 1); |