OSDN Git Service

* config/alpha/alpha.c (alpha_start_function): Use switch_to_section.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / cygming.h
index 89d35a7..bb02b7b 100644 (file)
@@ -1,6 +1,7 @@
 /* Operating system specific defines to be used when targeting GCC for
    hosting on Windows32, using a Unix style C library and tools.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+   2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -17,8 +18,8 @@ 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.  */
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 #define DBX_DEBUGGING_INFO 1
 #define SDB_DEBUGGING_INFO 1
@@ -50,26 +51,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include <stdio.h>
 
-/* Masks for subtarget switches used by other files.  */
-#define MASK_NOP_FUN_DLLIMPORT 0x08000000 /* Ignore dllimport for functions */
-
-/* Used in winnt.c.  */
-#define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
-
-#undef  SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES \
-{ "cygwin",              0, N_("Use the Cygwin interface") },  \
-{ "no-cygwin",           0, N_("Use the Mingw32 interface") }, \
-{ "windows",             0, N_("Create GUI application") },    \
-{ "no-win32",            0, N_("Don't set Windows defines") }, \
-{ "win32",               0, N_("Set Windows defines") },       \
-{ "console",             0, N_("Create console application") },\
-{ "dll",                 0, N_("Generate code for a DLL") },   \
-{ "nop-fun-dllimport",   MASK_NOP_FUN_DLLIMPORT,               \
-  N_("Ignore dllimport for functions") },                      \
-{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" },       \
-{ "threads",             0, N_("Use Mingw-specific thread support") },
-
 #define MAYBE_UWIN_CPP_BUILTINS() /* Nothing.  */
 
 #define TARGET_OS_CPP_BUILTINS()                                       \
@@ -127,53 +108,14 @@ Boston, MA 02111-1307, USA.  */
 union tree_node;
 #define TREE union tree_node *
 \f
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_drectve
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS                                        \
-  DRECTVE_SECTION_FUNCTION                                     \
-  SWITCH_TO_SECTION_FUNCTION
-
-#define DRECTVE_SECTION_FUNCTION \
-void                                                                   \
-drectve_section (void)                                                 \
-{                                                                      \
-  if (in_section != in_drectve)                                                \
-    {                                                                  \
-      fprintf (asm_out_file, "%s\n", "\t.section .drectve\n");         \
-      in_section = in_drectve;                                         \
-    }                                                                  \
-}
-void drectve_section (void);
+#define drectve_section() \
+  (fprintf (asm_out_file, "\t.section .drectve\n"), \
+   in_section = NULL)
 
 /* Older versions of gas don't handle 'r' as data.
    Explicitly set data flag with 'd'.  */  
 #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata,\"dr\""
 
-/* Switch to SECTION (an `enum in_section').
-
-   ??? This facility should be provided by GCC proper.
-   The problem is that we want to temporarily switch sections in
-   ASM_DECLARE_OBJECT_NAME and then switch back to the original section
-   afterwards.  */
-#define SWITCH_TO_SECTION_FUNCTION                             \
-void switch_to_section (enum in_section, tree);                        \
-void                                                           \
-switch_to_section (enum in_section section, tree decl)         \
-{                                                              \
-  switch (section)                                             \
-    {                                                          \
-      case in_text: text_section (); break;                    \
-      case in_unlikely_executed_text: unlikely_text_section (); break; \
-      case in_data: data_section (); break;                    \
-      case in_readonly_data: readonly_data_section (); break;  \
-      case in_named: named_section (decl, NULL, 0); break;     \
-      case in_drectve: drectve_section (); break;              \
-      default: abort (); break;                                \
-    }                                                          \
-}
-
 /* Don't allow flag_pic to propagate since gas may produce invalid code
    otherwise.  */
 
@@ -182,7 +124,7 @@ switch_to_section (enum in_section section, tree decl)              \
 do {                                                                   \
   if (flag_pic)                                                                \
     {                                                                  \
-      warning ("-f%s ignored for target (all code is position independent)",\
+      warning (0, "-f%s ignored for target (all code is position independent)",\
               (flag_pic > 1) ? "PIC" : "pic");                         \
       flag_pic = 0;                                                    \
     }                                                                  \
@@ -205,8 +147,8 @@ do {                                                                        \
    section and we need to set DECL_SECTION_NAME so we do that here.
    Note that we can be called twice on the same decl.  */
 
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO  i386_pe_encode_section_info
+#undef SUBTARGET_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
 \f
@@ -214,6 +156,9 @@ do {                                                                        \
 #undef ASM_OUTPUT_LABELREF
 #define ASM_OUTPUT_LABELREF  i386_pe_output_labelref
 
+#undef  COMMON_ASM_OP
+#define COMMON_ASM_OP  "\t.comm\t"
+
 /* Output a common block.  */
 #undef ASM_OUTPUT_COMMON
 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
@@ -422,6 +367,13 @@ extern int i386_pe_dllimport_name_p (const char *);
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ \
   { "selectany", 0, 0, true, false, false, ix86_handle_selectany_attribute }
 
+/*  mcount() does not need a counter variable.  */
+#undef NO_PROFILE_COUNTERS
+#define NO_PROFILE_COUNTERS 1
+
+#define TARGET_VALID_DLLIMPORT_ATTRIBUTE_P i386_pe_valid_dllimport_attribute_p
+#define TARGET_CXX_ADJUST_CLASS_AT_DEFINITION i386_pe_adjust_class_at_definition
+
 #undef TREE
 
 #ifndef BUFSIZ