m68k.h (OVERRIDE_OPTIONS): Move additional code ...
authorRichard Henderson <rth@redhat.com>
Fri, 4 Oct 2002 02:19:40 +0000 (19:19 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 4 Oct 2002 02:19:40 +0000 (19:19 -0700)
        * config/m68k/m68k.h (OVERRIDE_OPTIONS): Move additional code ...
        * config/m68k/m68k.c (override_options): ... here.
        * config/m68k/m68kelf.h (OVERRIDE_OPTIONS): Remove.
        * config/m68k/m68kv4.h (OVERRIDE_OPTIONS): Remove.
        * config/m68k/linux.h (SUBTARGET_OVERRIDE_OPTIONS): Remove.
        * config/m68k/netbsd-elf.h (SUBTARGET_OVERRIDE_OPTIONS): Remove.

From-SVN: r57797

gcc/ChangeLog
gcc/config/m68k/linux.h
gcc/config/m68k/m68k.c
gcc/config/m68k/m68k.h
gcc/config/m68k/m68kelf.h
gcc/config/m68k/m68kv4.h
gcc/config/m68k/netbsd-elf.h

index f1e80bbb866dd8d25dbc1c5fe2d527e8f152598d..c15ccb72daac8430e4d52df77b5ffceccf098aa7 100644 (file)
@@ -1,3 +1,12 @@
+2002-10-03  Richard Henderson  <rth@redhat.com>
+
+       * config/m68k/m68k.h (OVERRIDE_OPTIONS): Move additional code ...
+       * config/m68k/m68k.c (override_options): ... here.
+       * config/m68k/m68kelf.h (OVERRIDE_OPTIONS): Remove.
+       * config/m68k/m68kv4.h (OVERRIDE_OPTIONS): Remove.
+       * config/m68k/linux.h (SUBTARGET_OVERRIDE_OPTIONS): Remove.
+       * config/m68k/netbsd-elf.h (SUBTARGET_OVERRIDE_OPTIONS): Remove.
+
 2002-10-03  Richard Henderson  <rth@redhat.com>
 
        * real.h (struct real_value): Use ENUM_BITFIELD.
index af7b9285c2c1d17a7483ce1a8eaddfcbc8bec329..2778d27f5f7e3f8d22f7d8600755ff5f77ee9cfc 100644 (file)
@@ -315,15 +315,6 @@ do {                                                                       \
    || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))              \
    || PCREL_GENERAL_OPERAND_OK)
 
-/* Turn off function cse if we are doing PIC. We always want function
-   call to be done as `bsr foo@PLTPC', so it will force the assembler
-   to create the PLT entry for `foo'.  Doing function cse will cause
-   the address of `foo' to be loaded into a register, which is exactly
-   what we want to avoid when we are doing PIC on svr4 m68k.  */
-#undef SUBTARGET_OVERRIDE_OPTIONS
-#define SUBTARGET_OVERRIDE_OPTIONS \
-  if (flag_pic) flag_no_function_cse = 1;
-
 /* For m68k SVR4, structures are returned using the reentrant
    technique.  */
 #undef PCC_STATIC_STRUCT_RETURN
index 6114664bb8b161bc101895f7394f30b1f0c412ed..fc635fb9aa823c62e7fc82d5cde08156aea8f8dd 100644 (file)
@@ -175,6 +175,27 @@ override_options ()
        m68k_align_funcs = i;
     }
 
+  /* -fPIC uses 32-bit pc-relative displacements, which don't exist
+     until the 68020.  */
+  if (! TARGET_68020 && flag_pic == 2)
+    error("-fPIC is not currently supported on the 68000 or 68010\n");
+
+  /* ??? A historic way of turning on pic, or is this intended to
+     be an embedded thing that doesn't have the same name binding
+     significance that it does on hosted ELF systems?  */
+  if (TARGET_PCREL && flag_pic == 0)
+    flag_pic = 1;
+
+  /* Turn off function cse if we are doing PIC.  We always want function call
+     to be done as `bsr foo@PLTPC', so it will force the assembler to create
+     the PLT entry for `foo'. Doing function cse will cause the address of
+     `foo' to be loaded into a register, which is exactly what we want to
+     avoid when we are doing PIC on svr4 m68k.  */
+  if (flag_pic)
+    flag_no_function_cse = 1;
+
+  SUBTARGET_OVERRIDE_OPTIONS;
+
   /* Tell the compiler which flavor of XFmode we're using.  */
   real_format_for_mode[XFmode - QFmode] = &ieee_extended_motorola_format;
 }
index 3650b91feef26a8b1105365f40153534d61af34b..703a37966112c37910034b49c53f1f65d57cd234 100644 (file)
@@ -277,15 +277,7 @@ extern int target_flags;
    Don't use this macro to turn on various extra optimizations for
    `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
 
-#define OVERRIDE_OPTIONS               \
-{                                      \
-  override_options();                  \
-  if (! TARGET_68020 && flag_pic == 2) \
-    error("-fPIC is not currently supported on the 68000 or 68010\n"); \
-  if (TARGET_PCREL && flag_pic == 0)   \
-    flag_pic = 1;                      \
-  SUBTARGET_OVERRIDE_OPTIONS;          \
-}
+#define OVERRIDE_OPTIONS   override_options()
 
 /* These are meant to be redefined in the host dependent files */
 #define SUBTARGET_SWITCHES
index fef3ebcda8533cbbdea7f81b24ff82d7acae5dd6..7866a239209cf61e756930a562b3427cd3d202b5 100644 (file)
@@ -251,20 +251,6 @@ extern int switch_table_difference_label_flag;
    || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))      \
    || PCREL_GENERAL_OPERAND_OK)
 
-/* Turn off function cse if we are doing PIC. We always want function call
-   to be done as `bsr foo@PLTPC', so it will force the assembler to create 
-   the PLT entry for `foo'. Doing function cse will cause the address of `foo'
-   to be loaded into a register, which is exactly what we want to avoid when
-   we are doing PIC on svr4 m68k.  */
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS               \
-{                                      \
-  if (flag_pic) flag_no_function_cse = 1; \
-  if (! TARGET_68020 && flag_pic == 2) \
-    error("-fPIC is not currently supported on the 68000 or 68010\n"); \
-  if (TARGET_PCREL && flag_pic == 0)   \
-    flag_pic = 1;                      \
-}
 /* end of stuff from m68kv4.h */
 
 #undef SGS_CMP_ORDER
index fbe7c426731cd1625461790781cbe1b928f7f338..5318824ecb37fd3523b8596cc5f06c8c78ed3ecb 100644 (file)
@@ -283,19 +283,6 @@ int switch_table_difference_label_flag;
    || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))              \
    || PCREL_GENERAL_OPERAND_OK)
 
-/* Turn off function cse if we are doing PIC. We always want function call
-   to be done as `bsr foo@PLTPC', so it will force the assembler to create 
-   the PLT entry for `foo'. Doing function cse will cause the address of `foo'
-   to be loaded into a register, which is exactly what we want to avoid when
-   we are doing PIC on svr4 m68k.  */
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS               \
-{                                      \
-  if (flag_pic) flag_no_function_cse = 1; \
-  if (! TARGET_68020 && flag_pic == 2) \
-    error("-fPIC is not currently supported on the 68000 or 68010\n"); \
-}
-
 /* Output assembler code for a block containing the constant parts
    of a trampoline, leaving space for the variable parts.  */
 
index 92291445452a81765379270717a8e5d51917363c..078cd14982b4464a7db22090e4124878ce748876 100644 (file)
@@ -273,17 +273,6 @@ while (0)
   fprintf ((FILE), ",%u\n", (SIZE)))
 
 
-/* Turn off function cse if we are doing PIC. We always want function
-   call to be done as `bsr foo@PLTPC', so it will force the assembler
-   to create the PLT entry for `foo'.  Doing function cse will cause
-   the address of `foo' to be loaded into a register, which is exactly
-   what we want to avoid when we are doing PIC on svr4 m68k.  */
-
-#undef SUBTARGET_OVERRIDE_OPTIONS
-#define SUBTARGET_OVERRIDE_OPTIONS                                     \
-  if (flag_pic) flag_no_function_cse = 1;
-
-
 /* XXX
    This is the end of the chunk lifted from m68kelf.h  */