]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386-protos.h (x86_field_alignment): Declare.
authorJan Hubicka <jh@suse.cz>
Sun, 16 Jun 2002 22:35:06 +0000 (22:35 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 16 Jun 2002 22:35:06 +0000 (22:35 +0000)
* i386-protos.h (x86_field_alignment): Declare.
* i386.c (x86_field_alignment): Define.
* i386.h (ADJUST_FIELD_ALIGNMENT): New.
(BIGGEST_FIELD_ALIGNMENT): Kill.

From-SVN: r54685

gcc/ChangeLog
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h

index 083acab56d080c909b9a68eff0f0186105220f99..921f99bf738092cdcc29ef1f3771d437d8a43187 100644 (file)
@@ -1,3 +1,10 @@
+Mon Jun 17 00:31:46 CEST 2002  Jan Hubicka  <jH@suse.cz>
+
+       * i386-protos.h (x86_field_alignment): Declare.
+       * i386.c (x86_field_alignment): Define.
+       * i386.h (ADJUST_FIELD_ALIGNMENT): New.
+       (BIGGEST_FIELD_ALIGNMENT): Kill.
+
 2002-06-16  Richard Henderson  <rth@redhat.com>
 
        PR opt/6722
index 00432034c3ff0ed59354361e4a3a93c8d5a144bb..03de4b173cdd8f0b0ebd4ec5c5f45f7f4191e064 100644 (file)
@@ -195,4 +195,5 @@ extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *,
                                                        int));
 extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int));
 extern void x86_output_mi_thunk PARAMS ((FILE *, int, tree));
+extern int x86_field_alignment PARAMS ((tree, int));
 #endif
index 4c82b2907c0d8d44bb426b19902fe48eac8eb733..9e651e2779689bedd84fe6b5505c38871f7a16b9 100644 (file)
@@ -12624,3 +12624,21 @@ x86_output_mi_thunk (file, delta, function)
        }
     }
 }
+
+int
+x86_field_alignment (field, computed)
+     tree field;
+     int computed;
+{
+  enum machine_mode mode;
+  if (TARGET_64BIT || DECL_USER_ALIGN (field) || TARGET_ALIGN_DOUBLE)
+    return computed;
+  mode = TYPE_MODE (TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE
+                   ? get_inner_array_type (field) : TREE_TYPE (field));
+  if ((mode == DFmode || mode == DCmode
+      || mode == DImode || mode == CDImode)
+      && !TARGET_ALIGN_DOUBLE)
+    return MIN (32, computed);
+  return computed;
+}
+
index 2b9ad4be058da5f3622562843017f9cc33ba9c5d..1a4aa858afdba9f2a5d7d717e035072dbb7ea508 100644 (file)
@@ -609,7 +609,7 @@ extern int ix86_arch;
 %{mcpu=athlon-4|mcpu=athlon-xp|mcpu=athlon-mp:\
 -D__tune_athlon_sse__ }\
 %{mcpu=pentium4:-D__tune_pentium4__ }\
-%{march=athlon-tbird|march=athlon-xp|march=athlon-mp|march=pentium3|march=pentium4:\
+%{march=athlon-xp|march=athlon-mp|march=pentium3|march=pentium4:\
 -D__SSE__ }\
 %{march=pentium-mmx|march=k6|march=k6-2|march=k6-3\
 |march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
@@ -781,13 +781,9 @@ extern int ix86_arch;
 /* The published ABIs say that doubles should be aligned on word
    boundaries, so lower the aligment for structure fields unless
    -malign-double is set.  */
-/* BIGGEST_FIELD_ALIGNMENT is also used in libobjc, where it must be
-   constant.  Use the smaller value in that context.  */
-#ifndef IN_TARGET_LIBS
-#define BIGGEST_FIELD_ALIGNMENT (TARGET_64BIT ? 128 : (TARGET_ALIGN_DOUBLE ? 64 : 32))
-#else
-#define BIGGEST_FIELD_ALIGNMENT 32
-#endif
+
+#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
+   x86_field_alignment (FIELD, COMPUTED)
 
 /* If defined, a C expression to compute the alignment given to a
    constant that is being placed in memory.  EXP is the constant