This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 5/5] remove usage of ADJUST_FIELD_ALIGN in encoding.c
- From: tbsaunde+gcc at tbsaunde dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Oct 2015 07:48:12 -0400
- Subject: [PATCH 5/5] remove usage of ADJUST_FIELD_ALIGN in encoding.c
- Authentication-results: sourceware.org; auth=none
- References: <1446205692-22412-1-git-send-email-tbsaunde+gcc at tbsaunde dot org>
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
Not many targets define this macro in ways that do something in libojc,
so it seems to make sense to just inline the few definitions that do do
something.
libobjc/ChangeLog:
2015-10-30 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
PR libobjc/24775
* encoding.c (objc_layout_structure_next_member): Remove usage
of ADJUST_FIELD_ALIGN.
---
libobjc/encoding.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libobjc/encoding.c b/libobjc/encoding.c
index 7438d64..0fbfd39 100644
--- a/libobjc/encoding.c
+++ b/libobjc/encoding.c
@@ -1171,8 +1171,12 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
#elif defined __tilegx__
desired_align = MIN (desired_align, 128);
#endif
-#ifdef ADJUST_FIELD_ALIGN
- desired_align = ADJUST_FIELD_ALIGN (type, desired_align);
+#if defined __arc__ || defined _AIX
+ if (TYPE_MODE (strip_array_types (TREE_TYPE (type))) == DFmode)
+ desired_align = MIN (desired_align, 32);
+#elif __POWERPC__ && __APPLE__
+ if (desired_align != 128)
+ desired_align = MIN (desired_align, 32);
#endif
/* Record must have at least as much alignment as any field.
--
2.6.2