OSDN Git Service

* dwarf2out.c (mem_loc_descriptor): Replace ASM_SIMPLIFY_DWARF_ADDR
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Feb 2003 01:23:41 +0000 (01:23 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Feb 2003 01:23:41 +0000 (01:23 +0000)
with *targetm.delegitimize_address.
(rtl_for_decl_location): Likewise.
* dwarfout.c (output_mem_loc_descriptor): Likewise.  Include target.h.
* Makefile.in (dwarf2out.c, dwarfout.c): Depend upon $(TARGET_H)

* config/i386/i386.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition.
* config/i386/i386-protos.h (i386_simplify_dwarf_addr): Remove
prototype.
* config/i386/i386.c (ix86_delegitimize_address): Renamed from
i386_simplify_dwarf_addr.  Made static.  Prototyped.
(TARGET_DELEGITIMIZE_ADDRESS): Update definition from
i386_simplify_dwarf_addr to ix86_delegitimize_address.
(ix86_find_base_term): Likewise.
(maybe_get_pool_constant): Likewise.

* config/s390/s390.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition.
* config/s390/s390-protos.h (s390_simplify_dwarf_addr): Remove
prototype.
* config/s390/s390.c (s390_delegitimize_address): Renamed from
s390_simplify_dwarf_addr.  Made static.  Prototyped.
(TARGET_DELEGITIMIZE_ADDRESS): Define as s390_delegitimize_address.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62468 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h
gcc/dwarf2out.c
gcc/dwarfout.c

index 9f39d89..b78f702 100644 (file)
@@ -1,3 +1,28 @@
+2003-02-05  Roger Sayle  <roger@eyesopen.com>
+
+       * dwarf2out.c (mem_loc_descriptor): Replace ASM_SIMPLIFY_DWARF_ADDR
+       with *targetm.delegitimize_address.
+       (rtl_for_decl_location): Likewise.
+       * dwarfout.c (output_mem_loc_descriptor): Likewise.  Include target.h.
+       * Makefile.in (dwarf2out.c, dwarfout.c): Depend upon $(TARGET_H)
+
+       * config/i386/i386.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition.
+       * config/i386/i386-protos.h (i386_simplify_dwarf_addr): Remove
+       prototype.
+       * config/i386/i386.c (ix86_delegitimize_address): Renamed from
+       i386_simplify_dwarf_addr.  Made static.  Prototyped.
+       (TARGET_DELEGITIMIZE_ADDRESS): Update definition from
+       i386_simplify_dwarf_addr to ix86_delegitimize_address.
+       (ix86_find_base_term): Likewise.
+       (maybe_get_pool_constant): Likewise.
+
+       * config/s390/s390.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition.
+       * config/s390/s390-protos.h (s390_simplify_dwarf_addr): Remove
+       prototype.
+       * config/s390/s390.c (s390_delegitimize_address): Renamed from
+       s390_simplify_dwarf_addr.  Made static.  Prototyped.
+       (TARGET_DELEGITIMIZE_ADDRESS): Define as s390_delegitimize_address.
+
 2003-02-05  Richard Henderson  <rth@redhat.com>
 
        PR c/8602
index a40d15a..2d1c6c1 100644 (file)
@@ -1497,11 +1497,12 @@ sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_
    sdbout.h toplev.h $(TM_P_H) except.h debug.h langhooks.h gt-sdbout.h
 dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) dwarf.h flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \
-   debug.h langhooks.h
+   debug.h langhooks.h $(TARGET_H)
 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) dwarf2.h debug.h flags.h insn-config.h reload.h output.h diagnostic.h real.h \
    hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \
-   $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h
+   $(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) \
+   gt-dwarf2out.h $(TARGET_H)
 dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) flags.h $(RTL_H) \
    $(TREE_H) output.h dwarf2asm.h $(TM_P_H) $(GGC_H) gt-dwarf2asm.h
 vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
index 46493fd..c920985 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler for IA-32.
    Copyright (C) 1988, 1992, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -121,7 +121,6 @@ extern const char *output_fp_compare PARAMS ((rtx, rtx*, int, int));
 
 extern void i386_dwarf_output_addr_const PARAMS ((FILE*, rtx));
 extern void i386_output_dwarf_dtprel PARAMS ((FILE*, int, rtx));
-extern rtx i386_simplify_dwarf_addr PARAMS ((rtx));
 
 extern void ix86_expand_clear PARAMS ((rtx));
 extern void ix86_expand_move PARAMS ((enum machine_mode, rtx[]));
index 3a3a2f9..bb4c22d 100644 (file)
@@ -842,6 +842,7 @@ struct ix86_address
 static int ix86_decompose_address PARAMS ((rtx, struct ix86_address *));
 static int ix86_address_cost PARAMS ((rtx));
 static bool ix86_cannot_force_const_mem PARAMS ((rtx));
+static rtx ix86_delegitimize_address PARAMS ((rtx));
 
 static void ix86_encode_section_info PARAMS ((tree, int)) ATTRIBUTE_UNUSED;
 static const char *ix86_strip_name_encoding PARAMS ((const char *))
@@ -991,7 +992,7 @@ static enum x86_64_reg_class merge_classes PARAMS ((enum x86_64_reg_class,
 #define TARGET_CANNOT_FORCE_CONST_MEM ix86_cannot_force_const_mem
 
 #undef TARGET_DELEGITIMIZE_ADDRESS
-#define TARGET_DELEGITIMIZE_ADDRESS i386_simplify_dwarf_addr
+#define TARGET_DELEGITIMIZE_ADDRESS ix86_delegitimize_address
 
 #undef TARGET_MS_BITFIELD_LAYOUT_P
 #define TARGET_MS_BITFIELD_LAYOUT_P ix86_ms_bitfield_layout_p
@@ -5371,7 +5372,7 @@ ix86_find_base_term (x)
       return term;
     }
 
-  term = i386_simplify_dwarf_addr (x);
+  term = ix86_delegitimize_address (x);
 
   if (GET_CODE (term) != SYMBOL_REF
       && GET_CODE (term) != LABEL_REF)
@@ -6605,8 +6606,8 @@ i386_output_dwarf_dtprel (file, size, x)
    general assembler losage, recognize PIC+GOTOFF and turn it back
    into a direct symbol reference.  */
 
-rtx
-i386_simplify_dwarf_addr (orig_x)
+static rtx
+ix86_delegitimize_address (orig_x)
      rtx orig_x;
 {
   rtx x = orig_x, y;
@@ -8036,7 +8037,7 @@ static rtx
 maybe_get_pool_constant (x)
      rtx x;
 {
-  x = i386_simplify_dwarf_addr (XEXP (x, 0));
+  x = ix86_delegitimize_address (XEXP (x, 0));
 
   if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
     return get_pool_constant (x);
index e46a19f..1fa4358 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler for IA-32.
    Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -2842,11 +2842,6 @@ do {                                                                     \
 #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE, X) \
   i386_dwarf_output_addr_const ((FILE), (X))
 
-/* Either simplify a location expression, or return the original.  */
-
-#define ASM_SIMPLIFY_DWARF_ADDR(X) \
-  i386_simplify_dwarf_addr (X)
-
 /* Emit a dtp-relative reference to a TLS variable.  */
 
 #ifdef HAVE_AS_TLS
index a1a3ba5..cb3326c 100644 (file)
@@ -76,7 +76,6 @@ extern void s390_output_constant_pool PARAMS ((rtx, rtx));
 extern void s390_trampoline_template PARAMS ((FILE *));
 extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx));
 extern rtx s390_gen_rtx_const_DI PARAMS ((int, int));
-extern rtx s390_simplify_dwarf_addr PARAMS ((rtx));
 extern void s390_machine_dependent_reorg PARAMS ((rtx));
 extern int s390_agen_dep_p PARAMS ((rtx, rtx));
 
index 6dfb3d5..30e7918 100644 (file)
@@ -56,6 +56,7 @@ static void s390_select_rtx_section PARAMS ((enum machine_mode, rtx,
 static void s390_encode_section_info PARAMS ((tree, int));
 static const char *s390_strip_name_encoding PARAMS ((const char *));
 static bool s390_cannot_force_const_mem PARAMS ((rtx));
+static rtx s390_delegitimize_address PARAMS ((rtx));
 static void s390_init_builtins PARAMS ((void));
 static rtx s390_expand_builtin PARAMS ((tree, rtx, rtx, 
                                        enum machine_mode, int));
@@ -98,6 +99,9 @@ static int s390_address_cost PARAMS ((rtx));
 #undef TARGET_CANNOT_FORCE_CONST_MEM
 #define TARGET_CANNOT_FORCE_CONST_MEM s390_cannot_force_const_mem
 
+#undef TARGET_DELEGITIMIZE_ADDRESS
+#define TARGET_DELEGITIMIZE_ADDRESS s390_delegitimize_address
+
 #undef  TARGET_INIT_BUILTINS
 #define TARGET_INIT_BUILTINS s390_init_builtins
 #undef  TARGET_EXPAND_BUILTIN
@@ -3056,8 +3060,8 @@ s390_expand_cmpstr (target, op0, op1, len)
    general assembler losage, recognize various UNSPEC sequences
    and turn them back into a direct symbol reference.  */
 
-rtx
-s390_simplify_dwarf_addr (orig_x)
+static rtx
+s390_delegitimize_address (orig_x)
      rtx orig_x;
 {
   rtx x = orig_x, y;
index 3cc731c..dc87757 100644 (file)
@@ -911,10 +911,6 @@ extern int flag_pic;
 /* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h.  */
 #define LOCAL_LABEL_PREFIX "."
 
-/* Either simplify a location expression, or return the original.  */
-#define ASM_SIMPLIFY_DWARF_ADDR(X) \
-  s390_simplify_dwarf_addr (X)
-
 /* How to refer to registers in assembler output.  This sequence is
    indexed by compiler's hard-register-number (see above).  */
 #define REGISTER_NAMES                                                 \
index 7f1418d..435b5c0 100644 (file)
@@ -1,6 +1,6 @@
 /* Output Dwarf2 format symbol table information from the GNU C compiler.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+   2003 Free Software Foundation, Inc.
    Contributed by Gary Funck (gary@intrepid.com).
    Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
    Extensively modified by Jason Merrill (jason@cygnus.com).
@@ -8270,9 +8270,7 @@ mem_loc_descriptor (rtl, mode)
      actually within the array.  That's *not* necessarily the same as the
      zeroth element of the array.  */
 
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
-  rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+  rtl = (*targetm.delegitimize_address) (rtl);
 
   switch (GET_CODE (rtl))
     {
@@ -9370,9 +9368,7 @@ rtl_for_decl_location (decl)
              || (GET_CODE (rtl) == MEM
                  && CONSTANT_P (XEXP (rtl, 0)))))
        {
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
-         rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+         rtl = (*targetm.delegitimize_address) (rtl);
          return rtl;
        }
       rtl = NULL_RTX;
@@ -9478,10 +9474,8 @@ rtl_for_decl_location (decl)
        }
     }
 
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
   if (rtl)
-    rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+    rtl = (*targetm.delegitimize_address) (rtl);
 
   /* If we don't look past the constant pool, we risk emitting a
      reference to a constant pool entry that isn't referenced from
index e9a35bb..07528cd 100644 (file)
@@ -1,6 +1,6 @@
 /* Output Dwarf format symbol table information from the GNU C compiler.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 2002,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002, 2003 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
 
 This file is part of GCC.
@@ -581,6 +581,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "toplev.h"
 #include "tm_p.h"
 #include "debug.h"
+#include "target.h"
 #include "langhooks.h"
 
 /* NOTE: In the comments in this file, many references are made to
@@ -2097,9 +2098,7 @@ output_mem_loc_descriptor (rtl)
      which is actually within the array.  That's *not* necessarily the
      same as the zeroth element of the array.  */
 
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
-  rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+  rtl = (*targetm.delegitimize_address) (rtl);
 
   switch (GET_CODE (rtl))
     {