OSDN Git Service

config/i386:
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / i386.h
index 58f65c1..0064adf 100644 (file)
@@ -192,7 +192,7 @@ extern int target_flags;
 #ifdef TARGET_BI_ARCH
 #define TARGET_64BIT (target_flags & MASK_64BIT)
 #else
-#ifdef TARGET_64BIT_DEFAULT
+#if TARGET_64BIT_DEFAULT
 #define TARGET_64BIT 1
 #else
 #define TARGET_64BIT 0
@@ -222,6 +222,7 @@ extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8;
 extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall;
 extern const int x86_accumulate_outgoing_args, x86_prologue_using_move;
 extern const int x86_epilogue_using_move, x86_decompose_lea;
+extern const int x86_arch_always_fancy_math_387;
 extern int x86_prefetch_sse;
 
 #define TARGET_USE_LEAVE (x86_use_leave & CPUMASK)
@@ -281,18 +282,26 @@ extern int x86_prefetch_sse;
 
 #define TARGET_RED_ZONE (!(target_flags & MASK_NO_RED_ZONE))
 
+#define TARGET_GNU_TLS (ix86_tls_dialect == TLS_DIALECT_GNU)
+#define TARGET_SUN_TLS (ix86_tls_dialect == TLS_DIALECT_SUN)
+
+/* WARNING: Do not mark empty strings for translation, as calling
+            gettext on an empty string does NOT return an empty
+            string. */
+
+
 #define TARGET_SWITCHES                                                              \
 { { "80387",                    MASK_80387, N_("Use hardware fp") },         \
   { "no-80387",                        -MASK_80387, N_("Do not use hardware fp") },  \
   { "hard-float",               MASK_80387, N_("Use hardware fp") },         \
   { "soft-float",              -MASK_80387, N_("Do not use hardware fp") },  \
   { "no-soft-float",            MASK_80387, N_("Use hardware fp") },         \
-  { "386",                      0, N_("") /*Deprecated.*/},                  \
-  { "486",                      0, N_("") /*Deprecated.*/},                  \
-  { "pentium",                  0, N_("") /*Deprecated.*/},                  \
-  { "pentiumpro",               0, N_("") /*Deprecated.*/},                  \
-  { "intel-syntax",             0, N_("") /*Deprecated.*/},                  \
-  { "no-intel-syntax",          0, N_("") /*Deprecated.*/},                  \
+  { "386",                      0, "" /*Deprecated.*/},                      \
+  { "486",                      0, "" /*Deprecated.*/},                      \
+  { "pentium",                  0, "" /*Deprecated.*/},                      \
+  { "pentiumpro",               0, "" /*Deprecated.*/},                      \
+  { "intel-syntax",             0, "" /*Deprecated.*/},                      \
+  { "no-intel-syntax",          0, "" /*Deprecated.*/},                      \
   { "rtd",                      MASK_RTD,                                    \
     N_("Alternate calling convention") },                                    \
   { "no-rtd",                  -MASK_RTD,                                    \
@@ -346,20 +355,20 @@ extern int x86_prefetch_sse;
     N_("Support MMX built-in functions") },                                  \
   { "no-mmx",                   -MASK_MMX,                                   \
     N_("Do not support MMX built-in functions") },                           \
-  { "no-mmx",                   MASK_MMX_SET, N_("") },                      \
+  { "no-mmx",                   MASK_MMX_SET, "" },                          \
   { "3dnow",                     MASK_3DNOW | MASK_3DNOW_SET,                \
     N_("Support 3DNow! built-in functions") },                               \
-  { "no-3dnow",                  -MASK_3DNOW, N_("") },                              \
+  { "no-3dnow",                  -MASK_3DNOW, "" },                          \
   { "no-3dnow",                  MASK_3DNOW_SET,                             \
     N_("Do not support 3DNow! built-in functions") },                        \
   { "sse",                      MASK_SSE | MASK_SSE_SET,                     \
     N_("Support MMX and SSE built-in functions and code generation") },              \
-  { "no-sse",                   -MASK_SSE, N_("") },                         \
+  { "no-sse",                   -MASK_SSE, "" },                             \
   { "no-sse",                   MASK_SSE_SET,                                \
     N_("Do not support MMX and SSE built-in functions and code generation") },\
   { "sse2",                     MASK_SSE2 | MASK_SSE2_SET,                   \
     N_("Support MMX, SSE and SSE2 built-in functions and code generation") }, \
-  { "no-sse2",                  -MASK_SSE2, N_("") },                        \
+  { "no-sse2",                  -MASK_SSE2, "" },                            \
   { "no-sse2",                  MASK_SSE2_SET,                               \
     N_("Do not support MMX, SSE and SSE2 built-in functions and code generation") },    \
   { "128bit-long-double",       MASK_128BIT_LONG_DOUBLE,                     \
@@ -375,38 +384,14 @@ extern int x86_prefetch_sse;
   { "no-red-zone",             MASK_NO_RED_ZONE,                             \
     N_("Do not use red-zone in the x86-64 code") },                          \
   SUBTARGET_SWITCHES                                                         \
-  { "", TARGET_DEFAULT, 0 }}
+  { "", TARGET_DEFAULT | TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_DEFAULT, 0 }}
 
-#ifdef TARGET_64BIT_DEFAULT
-#define TARGET_DEFAULT (MASK_64BIT | TARGET_SUBTARGET_DEFAULT)
-#else
-#define TARGET_DEFAULT TARGET_SUBTARGET_DEFAULT
+#ifndef TARGET_64BIT_DEFAULT
+#define TARGET_64BIT_DEFAULT 0
 #endif
 
-/* Which processor to schedule for. The cpu attribute defines a list that
-   mirrors this list, so changes to i386.md must be made at the same time.  */
+#define TARGET_DEFAULT MASK_OMIT_LEAF_FRAME_POINTER
 
-enum processor_type
-{
-  PROCESSOR_I386,                      /* 80386 */
-  PROCESSOR_I486,                      /* 80486DX, 80486SX, 80486DX[24] */
-  PROCESSOR_PENTIUM,
-  PROCESSOR_PENTIUMPRO,
-  PROCESSOR_K6,
-  PROCESSOR_ATHLON,
-  PROCESSOR_PENTIUM4,
-  PROCESSOR_max
-};
-enum fpmath_unit
-{
-  FPMATH_387 = 1,
-  FPMATH_SSE = 2
-};
-
-extern enum processor_type ix86_cpu;
-extern enum fpmath_unit ix86_fpmath;
-
-extern int ix86_arch;
 
 /* This macro is similar to `TARGET_SWITCHES' but defines names of
    command options that have values.  Its definition is an
@@ -440,11 +425,13 @@ extern int ix86_arch;
   { "cmodel=", &ix86_cmodel_string,                            \
     N_("Use given x86-64 code model") },                       \
   { "debug-arg", &ix86_debug_arg_string,                       \
-    N_("" /* Undocumented. */) },                              \
+    "" /* Undocumented. */ },                                  \
   { "debug-addr", &ix86_debug_addr_string,                     \
-    N_("" /* Undocumented. */) },                              \
+    "" /* Undocumented. */ },                                  \
   { "asm=", &ix86_asm_string,                                  \
     N_("Use given assembler dialect") },                       \
+  { "tls-dialect=", &ix86_tls_dialect_string,                  \
+    N_("Use given thread-local storage dialect") },            \
   SUBTARGET_OPTIONS                                            \
 }
 
@@ -486,6 +473,124 @@ extern int ix86_arch;
 %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.\n}"
 #endif
 \f
+/* Target CPU builtins.  */
+#define TARGET_CPU_CPP_BUILTINS()                              \
+  do                                                           \
+    {                                                          \
+      size_t arch_len = strlen (ix86_arch_string);             \
+      size_t cpu_len = strlen (ix86_cpu_string);               \
+      int last_arch_char = ix86_arch_string[arch_len - 1];     \
+      int last_cpu_char = ix86_cpu_string[cpu_len - 1];                \
+                                                               \
+      if (TARGET_64BIT)                                                \
+       {                                                       \
+         builtin_assert ("cpu=x86_64");                        \
+         builtin_assert ("machine=x86_64");                    \
+         builtin_define ("__x86_64");                          \
+         builtin_define ("__x86_64__");                        \
+       }                                                       \
+      else                                                     \
+       {                                                       \
+         builtin_assert ("cpu=i386");                          \
+         builtin_assert ("machine=i386");                      \
+         builtin_define_std ("i386");                          \
+       }                                                       \
+                                                               \
+      /* Built-ins based on -mcpu= (or -march= if no           \
+        CPU given).  */                                        \
+      if (TARGET_386)                                          \
+       builtin_define ("__tune_i386__");                       \
+      else if (TARGET_486)                                     \
+       builtin_define ("__tune_i486__");                       \
+      else if (TARGET_PENTIUM)                                 \
+       {                                                       \
+         builtin_define ("__tune_i586__");                     \
+         builtin_define ("__tune_pentium__");                  \
+         if (last_cpu_char == 'x')                             \
+           builtin_define ("__tune_pentium_mmx__");            \
+       }                                                       \
+      else if (TARGET_PENTIUMPRO)                              \
+       {                                                       \
+         builtin_define ("__tune_i686__");                     \
+         builtin_define ("__tune_pentiumpro__");               \
+       }                                                       \
+      else if (TARGET_K6)                                      \
+       {                                                       \
+         builtin_define ("__tune_k6__");                       \
+         if (last_cpu_char == '2')                             \
+           builtin_define ("__tune_k6_2__");                   \
+         else if (last_cpu_char == '3')                        \
+           builtin_define ("__tune_k6_3__");                   \
+       }                                                       \
+      else if (TARGET_ATHLON)                                  \
+       {                                                       \
+         builtin_define ("__tune_athlon__");                   \
+         /* Only plain "athlon" lacks SSE.  */                 \
+         if (last_cpu_char != 'n')                             \
+           builtin_define ("__tune_athlon_sse__");             \
+       }                                                       \
+      else if (TARGET_PENTIUM4)                                        \
+       builtin_define ("__tune_pentium4__");                   \
+                                                               \
+      if (TARGET_MMX)                                          \
+       builtin_define ("__MMX__");                             \
+      if (TARGET_3DNOW)                                                \
+       builtin_define ("__3dNOW__");                           \
+      if (TARGET_3DNOW_A)                                      \
+       builtin_define ("__3dNOW_A__");                         \
+      if (TARGET_SSE)                                          \
+       builtin_define ("__SSE__");                             \
+      if (TARGET_SSE2)                                         \
+       builtin_define ("__SSE2__");                            \
+                                                               \
+      /* Built-ins based on -march=.  */                       \
+      if (ix86_arch == PROCESSOR_I486)                         \
+       {                                                       \
+         builtin_define ("__i486");                            \
+         builtin_define ("__i486__");                          \
+       }                                                       \
+      else if (ix86_arch == PROCESSOR_PENTIUM)                 \
+       {                                                       \
+         builtin_define ("__i586");                            \
+         builtin_define ("__i586__");                          \
+         builtin_define ("__pentium");                         \
+         builtin_define ("__pentium__");                       \
+         if (last_arch_char == 'x')                            \
+           builtin_define ("__pentium_mmx__");                 \
+       }                                                       \
+      else if (ix86_arch == PROCESSOR_PENTIUMPRO)              \
+       {                                                       \
+         builtin_define ("__i686");                            \
+         builtin_define ("__i686__");                          \
+         builtin_define ("__pentiumpro");                      \
+         builtin_define ("__pentiumpro__");                    \
+       }                                                       \
+      else if (ix86_arch == PROCESSOR_K6)                      \
+       {                                                       \
+                                                               \
+         builtin_define ("__k6");                              \
+         builtin_define ("__k6__");                            \
+         if (last_arch_char == '2')                            \
+           builtin_define ("__k6_2__");                        \
+         else if (last_arch_char == '3')                       \
+           builtin_define ("__k6_3__");                        \
+       }                                                       \
+      else if (ix86_arch == PROCESSOR_ATHLON)                  \
+       {                                                       \
+         builtin_define ("__athlon");                          \
+         builtin_define ("__athlon__");                        \
+         /* Only plain "athlon" lacks SSE.  */                 \
+         if (last_arch_char != 'n')                            \
+           builtin_define ("__athlon_sse__");                  \
+       }                                                       \
+      else if (ix86_arch == PROCESSOR_PENTIUM4)                        \
+       {                                                       \
+         builtin_define ("__pentium4");                        \
+         builtin_define ("__pentium4__");                      \
+       }                                                       \
+    }                                                          \
+  while (0)
+
 #define TARGET_CPU_DEFAULT_i386 0
 #define TARGET_CPU_DEFAULT_i486 1
 #define TARGET_CPU_DEFAULT_pentium 2
@@ -504,133 +609,6 @@ extern int ix86_arch;
                                  "pentiumpro", "pentium2", "pentium3", \
                                  "pentium4", "k6", "k6-2", "k6-3",\
                                  "athlon", "athlon-4"}
-#ifndef CPP_CPU_DEFAULT_SPEC
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_i486
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i486__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i586__ -D__tune_pentium__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium_mmx
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i586__ -D__tune_pentium__ -D__tune_pentium_mmx__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentiumpro
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium2
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__\
--D__tune_pentium2__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium3
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__\
--D__tune_pentium2__ -D__tune_pentium3__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium4
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_pentium4__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6_2
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__ -D__tune_k6_2__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_k6_3
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_k6__ -D__tune_k6_3__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_athlon
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_athlon__"
-#endif
-#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_athlon_sse
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_athlon__ -D__tune_athlon_sse__"
-#endif
-#ifndef CPP_CPU_DEFAULT_SPEC
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i386__"
-#endif
-#endif /* CPP_CPU_DEFAULT_SPEC */
-
-#ifdef TARGET_BI_ARCH
-#define NO_BUILTIN_SIZE_TYPE
-#define NO_BUILTIN_PTRDIFF_TYPE
-#endif
-
-#ifdef NO_BUILTIN_SIZE_TYPE
-#define CPP_CPU32_SIZE_TYPE_SPEC \
-  " -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int"
-#define CPP_CPU64_SIZE_TYPE_SPEC \
-  " -D__SIZE_TYPE__=unsigned\\ long\\ int -D__PTRDIFF_TYPE__=long\\ int"
-#else
-#define CPP_CPU32_SIZE_TYPE_SPEC ""
-#define CPP_CPU64_SIZE_TYPE_SPEC ""
-#endif
-
-#define CPP_CPU32_SPEC \
-  "-Acpu=i386 -Amachine=i386 %{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 \
--D__i386__ %(cpp_cpu32sizet)"
-
-#define CPP_CPU64_SPEC \
-  "-Acpu=x86_64 -Amachine=x86_64 -D__x86_64 -D__x86_64__ %(cpp_cpu64sizet)"
-
-#define CPP_CPUCOMMON_SPEC "\
-%{march=i386:%{!mcpu*:-D__tune_i386__ }}\
-%{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\
-%{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__ \
-  %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ }}\
-%{march=pentium-mmx:-D__i586 -D__i586__ -D__pentium -D__pentium__ \
-  -D__pentium__mmx__ \
-  %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ -D__tune_pentium_mmx__}}\
-%{march=pentiumpro|march=i686:-D__i686 -D__i686__ \
-  -D__pentiumpro -D__pentiumpro__ \
-  %{!mcpu*:-D__tune_i686__ -D__tune_pentiumpro__ }}\
-%{march=k6:-D__k6 -D__k6__ %{!mcpu*:-D__tune_k6__ }}\
-%{march=k6-2:-D__k6 -D__k6__ -D__k6_2__ \
-  %{!mcpu*:-D__tune_k6__ -D__tune_k6_2__ }}\
-%{march=k6-3:-D__k6 -D__k6__ -D__k6_3__ \
-  %{!mcpu*:-D__tune_k6__ -D__tune_k6_3__ }}\
-%{march=athlon|march=athlon-tbird:-D__athlon -D__athlon__ \
-  %{!mcpu*:-D__tune_athlon__ }}\
-%{march=athlon-4|march=athlon-xp|march=athlon-mp:-D__athlon -D__athlon__ \
-  -D__athlon_sse__ \
-  %{!mcpu*:-D__tune_athlon__ -D__tune_athlon_sse__ }}\
-%{march=pentium4:-D__pentium4 -D__pentium4__ %{!mcpu*:-D__tune_pentium4__ }}\
-%{m386|mcpu=i386:-D__tune_i386__ }\
-%{m486|mcpu=i486:-D__tune_i486__ }\
-%{mpentium|mcpu=pentium|mcpu=i586|mcpu=pentium-mmx:-D__tune_i586__ -D__tune_pentium__ }\
-%{mpentiumpro|mcpu=pentiumpro|mcpu=i686|cpu=pentium2|cpu=pentium3:-D__tune_i686__ \
--D__tune_pentiumpro__ }\
-%{mcpu=k6|mcpu=k6-2|mcpu=k6-3:-D__tune_k6__ }\
-%{mcpu=athlon|mcpu=athlon-tbird|mcpu=athlon-4|mcpu=athlon-xp|mcpu=athlon-mp:\
--D__tune_athlon__ }\
-%{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:\
--D__SSE__ }\
-%{march=pentium-mmx|march=k6|march=k6-2|march=k6-3\
-march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
-|march=athlon-mp|march=pentium2|march=pentium3|march=pentium4: -D__MMX__ }\
-%{march=k6-2|march=k6-3\
-march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
-|march=athlon-mp: -D__3dNOW__ }\
-%{march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
-|march=athlon-mp: -D__3dNOW_A__ }\
-%{march=pentium4: -D__SSE2__ }\
-%{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}"
-
-#ifndef CPP_CPU_SPEC
-#ifdef TARGET_BI_ARCH
-#ifdef TARGET_64BIT_DEFAULT
-#define CPP_CPU_SPEC "%{m32:%(cpp_cpu32)}%{!m32:%(cpp_cpu64)} %(cpp_cpucommon)"
-#else
-#define CPP_CPU_SPEC "%{m64:%(cpp_cpu64)}%{!m64:%(cpp_cpu32)} %(cpp_cpucommon)"
-#endif
-#else
-#ifdef TARGET_64BIT_DEFAULT
-#define CPP_CPU_SPEC "%(cpp_cpu64) %(cpp_cpucommon)"
-#else
-#define CPP_CPU_SPEC "%(cpp_cpu32) %(cpp_cpucommon)"
-#endif
-#endif
-#endif
 
 #ifndef CC1_SPEC
 #define CC1_SPEC "%(cc1_cpu) "
@@ -651,21 +629,12 @@ march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
 #endif
 
 #define EXTRA_SPECS                                                    \
-  { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC },                         \
-  { "cpp_cpu", CPP_CPU_SPEC },                                         \
-  { "cpp_cpu32", CPP_CPU32_SPEC },                                     \
-  { "cpp_cpu64", CPP_CPU64_SPEC },                                     \
-  { "cpp_cpu32sizet", CPP_CPU32_SIZE_TYPE_SPEC },                      \
-  { "cpp_cpu64sizet", CPP_CPU64_SIZE_TYPE_SPEC },                      \
-  { "cpp_cpucommon", CPP_CPUCOMMON_SPEC },                             \
   { "cc1_cpu",  CC1_CPU_SPEC },                                                \
   SUBTARGET_EXTRA_SPECS
 \f
 /* target machine storage layout */
 
 /* Define for XFmode or TFmode extended real floating point support.
-   This will automatically cause REAL_ARITHMETIC to be defined.
    The XFmode is specified by i386 ABI, while TFmode may be faster
    due to alignment and simplifications in the address calculations.
  */
@@ -689,7 +658,7 @@ march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
 #define DOUBLE_TYPE_SIZE 64
 #define LONG_LONG_TYPE_SIZE 64
 
-#if defined (TARGET_BI_ARCH) || defined (TARGET_64BIT_DEFAULT)
+#if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT
 #define MAX_BITS_PER_WORD 64
 #define MAX_LONG_TYPE_SIZE 64
 #else
@@ -697,11 +666,6 @@ march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
 #define MAX_LONG_TYPE_SIZE 32
 #endif
 
-/* Define if you don't want extended real, but do want to use the
-   software floating point emulator for REAL_ARITHMETIC and
-   decimal <-> binary conversion.  */
-/* #define REAL_ARITHMETIC */
-
 /* Define this if most significant byte of a word is the lowest numbered.  */
 /* That is true on the 80386.  */
 
@@ -716,23 +680,10 @@ march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
 /* Not true for 80386 */
 #define WORDS_BIG_ENDIAN 0
 
-/* number of bits in an addressable storage unit */
-#define BITS_PER_UNIT 8
-
-/* Width in bits of a "word", which is the contents of a machine register.
-   Note that this is not necessarily the width of data type `int';
-   if using 16-bit ints on a 80386, this would still be 32.
-   But on a machine with 16-bit registers, this would be 16.  */
-#define BITS_PER_WORD (TARGET_64BIT ? 64 : 32)
-
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)
 #define MIN_UNITS_PER_WORD 4
 
-/* Width in bits of a pointer.
-   See also the macro `Pmode' defined below.  */
-#define POINTER_SIZE BITS_PER_WORD
-
 /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
 #define PARM_BOUNDARY BITS_PER_WORD
 
@@ -926,38 +877,21 @@ march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
    registers listed in CALL_USED_REGISTERS, keeping the others
    available for storage of persistent values.
 
-   Three different versions of REG_ALLOC_ORDER have been tried:
+   The ORDER_REGS_FOR_LOCAL_ALLOC actually overwrite the order,
+   so this is just empty initializer for array.  */
 
-   If the order is edx, ecx, eax, ... it produces a slightly faster compiler,
-   but slower code on simple functions returning values in eax.
+#define REG_ALLOC_ORDER                                        \
+{  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\
+   18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \
+   33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,  \
+   48, 49, 50, 51, 52 }
 
-   If the order is eax, ecx, edx, ... it causes reload to abort when compiling
-   perl 4.036 due to not being able to create a DImode register (to hold a 2
-   word union).
+/* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order
+   to be rearranged based on a particular function.  When using sse math,
+   we want to allocase SSE before x87 registers and vice vera.  */
 
-   If the order is eax, edx, ecx, ... it produces better code for simple
-   functions, and a slightly slower compiler.  Users complained about the code
-   generated by allocating edx first, so restore the 'natural' order of things.  */
+#define ORDER_REGS_FOR_LOCAL_ALLOC x86_order_regs_for_local_alloc ()
 
-#define REG_ALLOC_ORDER                                        \
-/*ax,dx,cx,*/                                                  \
-{  0, 1, 2,                                                    \
-/* bx,si,di,bp,sp,*/                                           \
-   3, 4, 5, 6, 7,                                              \
-/*r8,r9,r10,r11,*/                                             \
-  37,38, 39, 40,                                               \
-/*r12,r15,r14,r13*/                                            \
-  41, 44, 43, 42,                                              \
-/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/                    \
-    21,  22,  23,  24,  25,  26,  27,  28,                     \
-/*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/              \
-    45,  46,   47,   48,   49,   50,   51,   52,               \
-/*st,st1,st2,st3,st4,st5,st6,st7*/                             \
-   8,  9, 10, 11, 12, 13, 14, 15,                              \
-/*,arg,cc,fpsr,dir,frame*/                                     \
-     16,17, 18, 19,   20,                                      \
-/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/                    \
-    29,  30,  31,  32,  33,  34,  35,  36 }
 
 /* Macro to conditionally modify fixed_regs/call_used_regs.  */
 #define CONDITIONAL_REGISTER_USAGE                                     \
@@ -969,7 +903,7 @@ do {                                                                        \
         call_used_regs[i] = (call_used_regs[i]                         \
                             & (TARGET_64BIT ? 2 : 1)) != 0;            \
       }                                                                        \
-    if (flag_pic)                                                      \
+    if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)                     \
       {                                                                        \
        fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;                        \
        call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;                    \
@@ -1018,9 +952,15 @@ do {                                                                      \
       ? (TARGET_64BIT ? 4 : 6)                                         \
       : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)))
 
+#define VALID_SSE2_REG_MODE(MODE) \
+    ((MODE) == V16QImode || (MODE) == V8HImode || (MODE) == V2DFmode    \
+     || (MODE) == V2DImode)
+
 #define VALID_SSE_REG_MODE(MODE)                                       \
     ((MODE) == TImode || (MODE) == V4SFmode || (MODE) == V4SImode      \
      || (MODE) == SFmode                                               \
+     /* Always accept SSE2 modes so that xmmintrin.h compiles.  */     \
+     || VALID_SSE2_REG_MODE (MODE)                                     \
      || (TARGET_SSE2 && ((MODE) == DFmode || VALID_MMX_REG_MODE (MODE))))
 
 #define VALID_MMX_REG_MODE_3DNOW(MODE) \
@@ -1145,11 +1085,20 @@ do {                                                                    \
 #define STATIC_CHAIN_REGNUM (TARGET_64BIT ? FIRST_REX_INT_REG + 10 - 8 : 2)
 
 /* Register to hold the addressing base for position independent
-   code access to data items.
-   We don't use PIC pointer for 64bit mode.  Define the regnum to
-   dummy value to prevent gcc from pessimizing code dealing with EBX.
- */
-#define PIC_OFFSET_TABLE_REGNUM (TARGET_64BIT ? INVALID_REGNUM : 3)
+   code access to data items.  We don't use PIC pointer for 64bit
+   mode.  Define the regnum to dummy value to prevent gcc from
+   pessimizing code dealing with EBX. 
+
+   To avoid clobbering a call-saved register unnecessarily, we renumber
+   the pic register when possible.  The change is visible after the
+   prologue has been emitted.  */
+
+#define REAL_PIC_OFFSET_TABLE_REGNUM  3
+
+#define PIC_OFFSET_TABLE_REGNUM                                \
+  (TARGET_64BIT || !flag_pic ? INVALID_REGNUM          \
+   : reload_completed ? REGNO (pic_offset_table_rtx)   \
+   : REAL_PIC_OFFSET_TABLE_REGNUM)
 
 /* Register in which address to store a structure value
    arrives in the function.  On the 386, the prologue
@@ -1347,7 +1296,7 @@ enum reg_class
 #define SSE_REG_P(N) (REG_P (N) && SSE_REGNO_P (REGNO (N)))
 
 #define SSE_FLOAT_MODE_P(MODE) \
-  ((TARGET_SSE_MATH && (MODE) == SFmode) || (TARGET_SSE2 && (MODE) == DFmode))
+  ((TARGET_SSE && (MODE) == SFmode) || (TARGET_SSE2 && (MODE) == DFmode))
 
 #define MMX_REGNO_P(N) ((N) >= FIRST_MMX_REG && (N) <= LAST_MMX_REG)
 #define MMX_REG_P(XOP) (REG_P (XOP) && MMX_REGNO_P (REGNO (XOP)))
@@ -1942,15 +1891,12 @@ do {                                                                    \
 
 #define MAX_REGS_PER_ADDRESS 2
 
-#define CONSTANT_ADDRESS_P(X)                                  \
-  (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF     \
-   || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST       \
-   || GET_CODE (X) == CONST_DOUBLE)
+#define CONSTANT_ADDRESS_P(X)  constant_address_p (X)
 
 /* Nonzero if the constant value X is a legitimate general operand.
    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
 
-#define LEGITIMATE_CONSTANT_P(X) 1
+#define LEGITIMATE_CONSTANT_P(X)  legitimate_constant_p (X)
 
 #ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                                \
@@ -2013,9 +1959,7 @@ do {                                                                      \
    when generating PIC code.  It is given that flag_pic is on and 
    that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
 
-#define LEGITIMATE_PIC_OPERAND_P(X)            \
-  (! SYMBOLIC_CONST (X)                                \
-   || legitimate_pic_address_disp_p (X))
+#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X)
 
 #define SYMBOLIC_CONST(X)      \
   (GET_CODE (X) == SYMBOL_REF                                          \
@@ -2249,50 +2193,229 @@ enum ix86_builtins
   IX86_BUILTIN_SSE_ZERO,
   IX86_BUILTIN_MMX_ZERO,
 
+  /* SSE2 */
+  IX86_BUILTIN_ADDPD,
+  IX86_BUILTIN_ADDSD,
+  IX86_BUILTIN_DIVPD,
+  IX86_BUILTIN_DIVSD,
+  IX86_BUILTIN_MULPD,
+  IX86_BUILTIN_MULSD,
+  IX86_BUILTIN_SUBPD,
+  IX86_BUILTIN_SUBSD,
+
+  IX86_BUILTIN_CMPEQPD,
+  IX86_BUILTIN_CMPLTPD,
+  IX86_BUILTIN_CMPLEPD,
+  IX86_BUILTIN_CMPGTPD,
+  IX86_BUILTIN_CMPGEPD,
+  IX86_BUILTIN_CMPNEQPD,
+  IX86_BUILTIN_CMPNLTPD,
+  IX86_BUILTIN_CMPNLEPD,
+  IX86_BUILTIN_CMPNGTPD,
+  IX86_BUILTIN_CMPNGEPD,
+  IX86_BUILTIN_CMPORDPD,
+  IX86_BUILTIN_CMPUNORDPD,
+  IX86_BUILTIN_CMPNEPD,
+  IX86_BUILTIN_CMPEQSD,
+  IX86_BUILTIN_CMPLTSD,
+  IX86_BUILTIN_CMPLESD,
+  IX86_BUILTIN_CMPGTSD,
+  IX86_BUILTIN_CMPGESD,
+  IX86_BUILTIN_CMPNEQSD,
+  IX86_BUILTIN_CMPNLTSD,
+  IX86_BUILTIN_CMPNLESD,
+  IX86_BUILTIN_CMPNGTSD,
+  IX86_BUILTIN_CMPNGESD,
+  IX86_BUILTIN_CMPORDSD,
+  IX86_BUILTIN_CMPUNORDSD,
+  IX86_BUILTIN_CMPNESD,
+
+  IX86_BUILTIN_COMIEQSD,
+  IX86_BUILTIN_COMILTSD,
+  IX86_BUILTIN_COMILESD,
+  IX86_BUILTIN_COMIGTSD,
+  IX86_BUILTIN_COMIGESD,
+  IX86_BUILTIN_COMINEQSD,
+  IX86_BUILTIN_UCOMIEQSD,
+  IX86_BUILTIN_UCOMILTSD,
+  IX86_BUILTIN_UCOMILESD,
+  IX86_BUILTIN_UCOMIGTSD,
+  IX86_BUILTIN_UCOMIGESD,
+  IX86_BUILTIN_UCOMINEQSD,
+
+  IX86_BUILTIN_MAXPD,
+  IX86_BUILTIN_MAXSD,
+  IX86_BUILTIN_MINPD,
+  IX86_BUILTIN_MINSD,
+
+  IX86_BUILTIN_ANDPD,
+  IX86_BUILTIN_ANDNPD,
+  IX86_BUILTIN_ORPD,
+  IX86_BUILTIN_XORPD,
+
+  IX86_BUILTIN_SQRTPD,
+  IX86_BUILTIN_SQRTSD,
+
+  IX86_BUILTIN_UNPCKHPD,
+  IX86_BUILTIN_UNPCKLPD,
+
+  IX86_BUILTIN_SHUFPD,
+
+  IX86_BUILTIN_LOADAPD,
+  IX86_BUILTIN_LOADUPD,
+  IX86_BUILTIN_STOREAPD,
+  IX86_BUILTIN_STOREUPD,
+  IX86_BUILTIN_LOADSD,
+  IX86_BUILTIN_STORESD,
+  IX86_BUILTIN_MOVSD,
+
+  IX86_BUILTIN_LOADHPD,
+  IX86_BUILTIN_LOADLPD,
+  IX86_BUILTIN_STOREHPD,
+  IX86_BUILTIN_STORELPD,
+
+  IX86_BUILTIN_CVTDQ2PD,
+  IX86_BUILTIN_CVTDQ2PS,
+
+  IX86_BUILTIN_CVTPD2DQ,
+  IX86_BUILTIN_CVTPD2PI,
+  IX86_BUILTIN_CVTPD2PS,
+  IX86_BUILTIN_CVTTPD2DQ,
+  IX86_BUILTIN_CVTTPD2PI,
+
+  IX86_BUILTIN_CVTPI2PD,
+  IX86_BUILTIN_CVTSI2SD,
+
+  IX86_BUILTIN_CVTSD2SI,
+  IX86_BUILTIN_CVTSD2SS,
+  IX86_BUILTIN_CVTSS2SD,
+  IX86_BUILTIN_CVTTSD2SI,
+
+  IX86_BUILTIN_CVTPS2DQ,
+  IX86_BUILTIN_CVTPS2PD,
+  IX86_BUILTIN_CVTTPS2DQ,
+
+  IX86_BUILTIN_MOVNTI,
+  IX86_BUILTIN_MOVNTPD,
+  IX86_BUILTIN_MOVNTDQ,
+
+  IX86_BUILTIN_SETPD1,
+  IX86_BUILTIN_SETPD,
+  IX86_BUILTIN_CLRPD,
+  IX86_BUILTIN_SETRPD,
+  IX86_BUILTIN_LOADPD1,
+  IX86_BUILTIN_LOADRPD,
+  IX86_BUILTIN_STOREPD1,
+  IX86_BUILTIN_STORERPD,
+
+  /* SSE2 MMX */
+  IX86_BUILTIN_MASKMOVDQU,
+  IX86_BUILTIN_MOVMSKPD,
+  IX86_BUILTIN_PMOVMSKB128,
+  IX86_BUILTIN_MOVQ2DQ,
+
+  IX86_BUILTIN_PACKSSWB128,
+  IX86_BUILTIN_PACKSSDW128,
+  IX86_BUILTIN_PACKUSWB128,
+
+  IX86_BUILTIN_PADDB128,
+  IX86_BUILTIN_PADDW128,
+  IX86_BUILTIN_PADDD128,
+  IX86_BUILTIN_PADDQ128,
+  IX86_BUILTIN_PADDSB128,
+  IX86_BUILTIN_PADDSW128,
+  IX86_BUILTIN_PADDUSB128,
+  IX86_BUILTIN_PADDUSW128,
+  IX86_BUILTIN_PSUBB128,
+  IX86_BUILTIN_PSUBW128,
+  IX86_BUILTIN_PSUBD128,
+  IX86_BUILTIN_PSUBQ128,
+  IX86_BUILTIN_PSUBSB128,
+  IX86_BUILTIN_PSUBSW128,
+  IX86_BUILTIN_PSUBUSB128,
+  IX86_BUILTIN_PSUBUSW128,
+
+  IX86_BUILTIN_PAND128,
+  IX86_BUILTIN_PANDN128,
+  IX86_BUILTIN_POR128,
+  IX86_BUILTIN_PXOR128,
+
+  IX86_BUILTIN_PAVGB128,
+  IX86_BUILTIN_PAVGW128,
+
+  IX86_BUILTIN_PCMPEQB128,
+  IX86_BUILTIN_PCMPEQW128,
+  IX86_BUILTIN_PCMPEQD128,
+  IX86_BUILTIN_PCMPGTB128,
+  IX86_BUILTIN_PCMPGTW128,
+  IX86_BUILTIN_PCMPGTD128,
+
+  IX86_BUILTIN_PEXTRW128,
+  IX86_BUILTIN_PINSRW128,
+
+  IX86_BUILTIN_PMADDWD128,
+
+  IX86_BUILTIN_PMAXSW128,
+  IX86_BUILTIN_PMAXUB128,
+  IX86_BUILTIN_PMINSW128,
+  IX86_BUILTIN_PMINUB128,
+
+  IX86_BUILTIN_PMULUDQ,
+  IX86_BUILTIN_PMULUDQ128,
+  IX86_BUILTIN_PMULHUW128,
+  IX86_BUILTIN_PMULHW128,
+  IX86_BUILTIN_PMULLW128,
+
+  IX86_BUILTIN_PSADBW128,
+  IX86_BUILTIN_PSHUFHW,
+  IX86_BUILTIN_PSHUFLW,
+  IX86_BUILTIN_PSHUFD,
+
+  IX86_BUILTIN_PSLLW128,
+  IX86_BUILTIN_PSLLD128,
+  IX86_BUILTIN_PSLLQ128,
+  IX86_BUILTIN_PSRAW128,
+  IX86_BUILTIN_PSRAD128,
+  IX86_BUILTIN_PSRLW128,
+  IX86_BUILTIN_PSRLD128,
+  IX86_BUILTIN_PSRLQ128,
+  IX86_BUILTIN_PSLLWI128,
+  IX86_BUILTIN_PSLLDI128,
+  IX86_BUILTIN_PSLLQI128,
+  IX86_BUILTIN_PSRAWI128,
+  IX86_BUILTIN_PSRADI128,
+  IX86_BUILTIN_PSRLWI128,
+  IX86_BUILTIN_PSRLDI128,
+  IX86_BUILTIN_PSRLQI128,
+
+  IX86_BUILTIN_PUNPCKHBW128,
+  IX86_BUILTIN_PUNPCKHWD128,
+  IX86_BUILTIN_PUNPCKHDQ128,
+  IX86_BUILTIN_PUNPCKLBW128,
+  IX86_BUILTIN_PUNPCKLWD128,
+  IX86_BUILTIN_PUNPCKLDQ128,
+
+  IX86_BUILTIN_CLFLUSH,
+  IX86_BUILTIN_MFENCE,
+  IX86_BUILTIN_LFENCE,
+
   IX86_BUILTIN_MAX
 };
 \f
-/* Define this macro if references to a symbol must be treated
-   differently depending on something about the variable or
-   function named by the symbol (such as what section it is in).
-
-   On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
-   so that we may access it directly in the GOT.  */
-
-#define ENCODE_SECTION_INFO(DECL)                              \
-do {                                                           \
-    if (flag_pic)                                              \
-      {                                                                \
-       rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'    \
-                  ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));    \
-                                                               \
-       if (GET_CODE (rtl) == MEM)                              \
-         {                                                     \
-           if (TARGET_DEBUG_ADDR                               \
-               && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd')   \
-             {                                                 \
-               fprintf (stderr, "Encode %s, public = %d\n",    \
-                        IDENTIFIER_POINTER (DECL_NAME (DECL)), \
-                        TREE_PUBLIC (DECL));                   \
-             }                                                 \
-                                                               \
-           SYMBOL_REF_FLAG (XEXP (rtl, 0))                     \
-             = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'      \
-                || ! TREE_PUBLIC (DECL));                      \
-         }                                                     \
-      }                                                                \
-} while (0)
-
-/* The `FINALIZE_PIC' macro serves as a hook to emit these special
-   codes once the function is being compiled into assembly code, but
-   not before.  (It is not done before, because in the case of
-   compiling an inline function, it would lead to multiple PIC
-   prologues being included in functions which used inline functions
-   and were compiled to assembly language.)  */
-
-#define FINALIZE_PIC \
-  (current_function_uses_pic_offset_table |= current_function_profile)
-
+#define TARGET_ENCODE_SECTION_INFO  ix86_encode_section_info
+#define TARGET_STRIP_NAME_ENCODING  ix86_strip_name_encoding
+
+#define ASM_OUTPUT_LABELREF(FILE,NAME)         \
+  do {                                         \
+    const char *xname = (NAME);                        \
+    if (xname[0] == '%')                       \
+      xname += 2;                              \
+    if (xname[0] == '*')                       \
+      xname += 1;                              \
+    else                                       \
+      fputs (user_label_prefix, FILE);         \
+    fputs (xname, FILE);                       \
+  } while (0)
 \f
 /* Max number of args passed in registers.  If this is more than 3, we will
    have problems with ebx (register #4), since it is a caller save register and
@@ -2412,16 +2535,21 @@ do {                                                    \
     return flag_pic && SYMBOLIC_CONST (RTX) ? 1 : 0;           \
                                                                \
   case CONST_DOUBLE:                                           \
-    {                                                          \
-      int code;                                                        \
-      if (GET_MODE (RTX) == VOIDmode)                          \
-       return 0;                                               \
-                                                               \
-      code = standard_80387_constant_p (RTX);                  \
-      return code == 1 ? 1 :                                   \
-            code == 2 ? 2 :                                    \
-                        3;                                     \
-    }
+    if (GET_MODE (RTX) == VOIDmode)                            \
+      return 0;                                                        \
+    switch (standard_80387_constant_p (RTX))                   \
+      {                                                                \
+      case 1: /* 0.0 */                                                \
+       return 1;                                               \
+      case 2: /* 1.0 */                                                \
+       return 2;                                               \
+      default:                                                 \
+       /* Start with (MEM (SYMBOL_REF)), since that's where    \
+          it'll probably end up.  Add a penalty for size.  */  \
+       return (COSTS_N_INSNS (1) + (flag_pic != 0)             \
+               + (GET_MODE (RTX) == SFmode ? 0                 \
+                  : GET_MODE (RTX) == DFmode ? 1 : 2));        \
+      }
 
 /* Delete the definition here when TOPLEVEL_COSTS_N_INSNS gets added to cse.c */
 #define TOPLEVEL_COSTS_N_INSNS(N) \
@@ -2583,6 +2711,9 @@ do {                                                      \
       TOPLEVEL_COSTS_N_INSNS (ix86_cost->add * 2);                     \
     TOPLEVEL_COSTS_N_INSNS (ix86_cost->add);                           \
                                                                        \
+  case FLOAT_EXTEND:                                                   \
+    TOPLEVEL_COSTS_N_INSNS (0);                                                \
+                                                                       \
   egress_rtx_costs:                                                    \
     break;
 
@@ -2928,7 +3059,7 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
    print_operand function.  */
 
 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
-  ((CODE) == '*' || (CODE) == '+')
+  ((CODE) == '*' || (CODE) == '+' || (CODE) == '&')
 
 /* Print the name of a register based on its machine mode and number.
    If CODE is 'w', pretend the mode is HImode.
@@ -2947,6 +3078,12 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
   print_operand_address ((FILE), (ADDR))
 
+#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \
+do {                                           \
+  if (! output_addr_const_extra (FILE, (X)))   \
+    goto FAIL;                                 \
+} while (0);
+
 /* Print the name of a register for based on its machine mode and number.
    This macro is used to print debugging output.
    This macro is different from PRINT_REG in that it may be used in
@@ -3076,7 +3213,12 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
   {"memory_displacement_operand", {MEM}},                              \
   {"cmpsi_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,       \
                     LABEL_REF, SUBREG, REG, MEM, AND}},                \
-  {"long_memory_operand", {MEM}},
+  {"long_memory_operand", {MEM}},                                      \
+  {"tls_symbolic_operand", {SYMBOL_REF}},                              \
+  {"global_dynamic_symbolic_operand", {SYMBOL_REF}},                   \
+  {"local_dynamic_symbolic_operand", {SYMBOL_REF}},                    \
+  {"initial_exec_symbolic_operand", {SYMBOL_REF}},                     \
+  {"local_exec_symbolic_operand", {SYMBOL_REF}},
 
 /* A list of predicates that do special things with modes, and so
    should not elicit warnings for VOIDmode match_operand.  */
@@ -3084,57 +3226,90 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
 #define SPECIAL_MODE_PREDICATES \
   "ext_register_operand",
 \f
-/* CM_32 is used by 32bit ABI
-   CM_SMALL is small model assuming that all code and data fits in the first
-   31bits of address space.
-   CM_KERNEL is model assuming that all code and data fits in the negative
-   31bits of address space.
-   CM_MEDIUM is model assuming that code fits in the first 31bits of address
-   space.  Size of data is unlimited.
-   CM_LARGE is model making no assumptions about size of particular sections.
-  
-   CM_SMALL_PIC is model for PIC libraries assuming that code+data+got/plt
-   tables first in 31bits of address space.
- */
+/* Which processor to schedule for. The cpu attribute defines a list that
+   mirrors this list, so changes to i386.md must be made at the same time.  */
+
+enum processor_type
+{
+  PROCESSOR_I386,                      /* 80386 */
+  PROCESSOR_I486,                      /* 80486DX, 80486SX, 80486DX[24] */
+  PROCESSOR_PENTIUM,
+  PROCESSOR_PENTIUMPRO,
+  PROCESSOR_K6,
+  PROCESSOR_ATHLON,
+  PROCESSOR_PENTIUM4,
+  PROCESSOR_max
+};
+
+extern enum processor_type ix86_cpu;
+extern const char *ix86_cpu_string;
+
+extern enum processor_type ix86_arch;
+extern const char *ix86_arch_string;
+
+enum fpmath_unit
+{
+  FPMATH_387 = 1,
+  FPMATH_SSE = 2
+};
+
+extern enum fpmath_unit ix86_fpmath;
+extern const char *ix86_fpmath_string;
+
+enum tls_dialect
+{
+  TLS_DIALECT_GNU,
+  TLS_DIALECT_SUN
+};
+
+extern enum tls_dialect ix86_tls_dialect;
+extern const char *ix86_tls_dialect_string;
+
 enum cmodel {
-  CM_32,
-  CM_SMALL,
-  CM_KERNEL,
-  CM_MEDIUM,
-  CM_LARGE,
-  CM_SMALL_PIC
+  CM_32,       /* The traditional 32-bit ABI.  */
+  CM_SMALL,    /* Assumes all code and data fits in the low 31 bits.  */
+  CM_KERNEL,   /* Assumes all code and data fits in the high 31 bits.  */
+  CM_MEDIUM,   /* Assumes code fits in the low 31 bits; data unlimited.  */
+  CM_LARGE,    /* No assumptions.  */
+  CM_SMALL_PIC /* Assumes code+data+got/plt fits in a 31 bit region.  */
 };
 
+extern enum cmodel ix86_cmodel;
+extern const char *ix86_cmodel_string;
+
 /* Size of the RED_ZONE area.  */
 #define RED_ZONE_SIZE 128
 /* Reserved area of the red zone for temporaries.  */
 #define RED_ZONE_RESERVE 8
-extern const char *ix86_debug_arg_string, *ix86_debug_addr_string;
 
 enum asm_dialect {
   ASM_ATT,
   ASM_INTEL
 };
+
 extern const char *ix86_asm_string;
 extern enum asm_dialect ix86_asm_dialect;
-/* Value of -mcmodel specified by user.  */
-extern const char *ix86_cmodel_string;
-extern enum cmodel ix86_cmodel;
-\f
-/* Variables in i386.c */
-extern const char *ix86_cpu_string;            /* for -mcpu=<xxx> */
-extern const char *ix86_arch_string;           /* for -march=<xxx> */
-extern const char *ix86_fpmath_string;         /* for -mfpmath=<xxx> */
-extern const char *ix86_regparm_string;                /* # registers to use to pass args */
-extern const char *ix86_align_loops_string;    /* power of two alignment for loops */
-extern const char *ix86_align_jumps_string;    /* power of two alignment for non-loop jumps */
-extern const char *ix86_align_funcs_string;    /* power of two alignment for functions */
-extern const char *ix86_preferred_stack_boundary_string;/* power of two alignment for stack boundary */
-extern const char *ix86_branch_cost_string;    /* values 1-5: see jump.c */
-extern int ix86_regparm;                       /* ix86_regparm_string as a number */
-extern int ix86_preferred_stack_boundary;      /* preferred stack boundary alignment in bits */
-extern int ix86_branch_cost;                   /* values 1-5: see jump.c */
-extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO */
+
+extern int ix86_regparm;
+extern const char *ix86_regparm_string;        
+
+extern int ix86_preferred_stack_boundary;
+extern const char *ix86_preferred_stack_boundary_string;
+
+extern int ix86_branch_cost;
+extern const char *ix86_branch_cost_string;
+
+extern const char *ix86_debug_arg_string;
+extern const char *ix86_debug_addr_string;
+
+/* Obsoleted by -f options.  Remove before 3.2 ships.  */
+extern const char *ix86_align_loops_string;
+extern const char *ix86_align_jumps_string;
+extern const char *ix86_align_funcs_string;
+
+/* Smallest class containing REGNO.  */
+extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER];
+
 extern rtx ix86_compare_op0;   /* operand 0 for comparisons */
 extern rtx ix86_compare_op1;   /* operand 1 for comparisons */
 \f