OSDN Git Service

2009-05-06 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / i386-interix.h
index 9e20b31..380b46c 100644 (file)
@@ -1,5 +1,6 @@
 /* Target definitions for GCC for Intel 80386 running Interix
-   Parts Copyright (C) 1991, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+   Parts Copyright (C) 1991, 1999, 2000, 2002, 2003, 2004, 2007, 2008
+   Free Software Foundation, Inc.
 
    Parts:
      by Douglas B. Rupp (drupp@cs.washington.edu).
@@ -11,7 +12,7 @@ This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -20,9 +21,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 /* The rest must follow.  */
 
@@ -36,14 +36,14 @@ Boston, MA 02111-1307, USA.  */
 /* By default, target has a 80387, uses IEEE compatible arithmetic,
    and returns float values in the 387 and needs stack probes
    We also align doubles to 64-bits for MSVC default compatibility
-   We do bitfields MSVC-compatibly by default, too. */
+   We do bitfields MSVC-compatibly by default, too.  */
 #undef TARGET_SUBTARGET_DEFAULT
 #define TARGET_SUBTARGET_DEFAULT \
    (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE | \
     MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT)
 
 #undef TARGET_CPU_DEFAULT
-#define TARGET_CPU_DEFAULT 2 /* 486 */
+#define TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT_i486
 
 #define WCHAR_TYPE_SIZE 16
 #define WCHAR_TYPE "short unsigned int"
@@ -53,6 +53,8 @@ Boston, MA 02111-1307, USA.  */
 
 #define ASM_LOAD_ADDR(loc, reg)   "     leal " #loc "," #reg "\n"
 
+#define TARGET_DECLSPEC 1
+
 /* cpp handles __STDC__ */
 #define TARGET_OS_CPP_BUILTINS()                                       \
   do                                                                   \
@@ -63,7 +65,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define ("_X86_=1");                                     \
        builtin_define ("__stdcall=__attribute__((__stdcall__))");      \
        builtin_define ("__cdecl=__attribute__((__cdecl__))");          \
-       builtin_define ("__declspec(x)=__attribute__((x))");            \
        builtin_assert ("system=unix");                                 \
        builtin_assert ("system=interix");                              \
        if (preprocessing_asm_p ())                                     \
@@ -82,7 +83,7 @@ Boston, MA 02111-1307, USA.  */
 #undef CPP_SPEC
 /* Write out the correct language type definition for the header files.  
    Unless we have assembler language, write out the symbols for C.
-   mieee is an Alpha specific variant.  Cross polination a bad idea.
+   mieee is an Alpha specific variant.  Cross pollination a bad idea.
    */
 #define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE} \
 -isystem %$INTERIX_ROOT/usr/include"
@@ -140,18 +141,18 @@ Boston, MA 02111-1307, USA.  */
    generated assembly code more compact (and thus faster to assemble)
    as well as more readable, especially for targets like the i386
    (where the only alternative is to output character sequences as
-   comma separated lists of numbers).   */
+   comma separated lists of numbers).  */
 
 #define ASM_OUTPUT_LIMITED_STRING(FILE, STR)                           \
   do                                                                   \
     {                                                                  \
-      register const unsigned char *_limited_str =                     \
+      const unsigned char *_limited_str =                              \
         (const unsigned char *) (STR);                                 \
-      register unsigned ch;                                            \
+      unsigned ch;                                                     \
       fprintf ((FILE), "%s\"", STRING_ASM_OP);                         \
       for (; (ch = *_limited_str); _limited_str++)                     \
         {                                                              \
-         register int escape = ESCAPES[ch];                            \
+         int escape = ESCAPES[ch];                                     \
          switch (escape)                                               \
            {                                                           \
            case 0:                                                     \
@@ -181,13 +182,13 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                            \
   do                                                                   \
     {                                                                  \
-      register const unsigned char *_ascii_bytes =                     \
+      const unsigned char *_ascii_bytes =                              \
         (const unsigned char *) (STR);                                 \
-      register const unsigned char *limit = _ascii_bytes + (LENGTH);   \
-      register unsigned bytes_in_chunk = 0;                            \
+      const unsigned char *limit = _ascii_bytes + (LENGTH);            \
+      unsigned bytes_in_chunk = 0;                                     \
       for (; _ascii_bytes < limit; _ascii_bytes++)                     \
         {                                                              \
-         register const unsigned char *p;                              \
+         const unsigned char *p;                                       \
          if (bytes_in_chunk >= 64)                                     \
            {                                                           \
              fputc ('\n', (FILE));                                     \
@@ -242,7 +243,7 @@ Boston, MA 02111-1307, USA.  */
    available at runtime, so it's hopeless to try.
 
    And if the user tries to set the flag for objc, give an error
-   so he has some clue. */
+   so he has some clue.  */
 
 #undef  SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS                                     \
@@ -284,7 +285,6 @@ do                                                                  \
     }                                                                  \
 while (0)
 
-#define HOST_PTR_PRINTF "%p"
 #define HOST_PTR_AS_INT unsigned long
 
 #define PCC_BITFIELD_TYPE_MATTERS 1
@@ -325,8 +325,7 @@ while (0)
    differently depending on something about the variable or
    function named by the symbol (such as what section it is in).  */
 
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
+#define SUBTARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
 #undef  TARGET_STRIP_NAME_ENCODING
 #define TARGET_STRIP_NAME_ENCODING  i386_pe_strip_name_encoding_full
 
@@ -335,14 +334,12 @@ while (0)
    .data$ sections correctly. See corresponding note in i386/interix.c. 
    MK.  */
 
-/* Define this macro if in some cases global symbols from one translation
-   unit may not be bound to undefined symbols in another translation unit
-   without user intervention.  For instance, under Microsoft Windows
-   symbols must be explicitly imported from shared libraries (DLLs).  */
-#define MULTIPLE_SYMBOL_SPACES
+/* Interix uses explicit import from shared libraries.  */
+#define MULTIPLE_SYMBOL_SPACES 1
 
 extern void i386_pe_unique_section (tree, int);
 #define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
 
 #define SUPPORTS_ONE_ONLY 1
 #endif /* 0 */
@@ -356,11 +353,10 @@ extern void i386_pe_unique_section (tree, int);
 /* Don't assume anything about the header files.  */
 #define NO_IMPLICIT_EXTERN_C
 
-/* MSVC returns structs of up to 8 bytes via registers. */
+/* MSVC returns structs of up to 8 bytes via registers.  */
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
-#undef RETURN_IN_MEMORY
-#define RETURN_IN_MEMORY(TYPE) \
-  (TYPE_MODE (TYPE) == BLKmode || \
-     (AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes(TYPE) > 8 ))
+#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
+       (TYPE_MODE (TYPE) == BLKmode \
+        || (AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes (TYPE) > 8 ))
\ No newline at end of file