summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-06 01:23:41 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-06 01:23:41 +0000
commit0757655756eddfe9bc198ed018c0861a3778ae39 (patch)
tree5844ccac41bfc727491a8560d29229520ef4c884 /gcc
parent6c58357224dd43ef64d3048654a967cbfabcb984 (diff)
downloadgcc-0757655756eddfe9bc198ed018c0861a3778ae39.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62468 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog25
-rw-r--r--gcc/Makefile.in5
-rw-r--r--gcc/config/i386/i386-protos.h3
-rw-r--r--gcc/config/i386/i386.c11
-rw-r--r--gcc/config/i386/i386.h7
-rw-r--r--gcc/config/s390/s390-protos.h1
-rw-r--r--gcc/config/s390/s390.c8
-rw-r--r--gcc/config/s390/s390.h4
-rw-r--r--gcc/dwarf2out.c16
-rw-r--r--gcc/dwarfout.c9
10 files changed, 51 insertions, 38 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f39d894ace..b78f7027913 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a40d15adb2b..2d1c6c16170 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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) \
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 46493fd3c12..c920985b21f 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -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[]));
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3a3a2f93d8e..bb4c22d914d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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);
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index e46a19f6b30..1fa4358c24d 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -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
diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h
index a1a3ba52d93..cb3326c74cf 100644
--- a/gcc/config/s390/s390-protos.h
+++ b/gcc/config/s390/s390-protos.h
@@ -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));
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 6dfb3d54118..30e7918d1e3 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -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;
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 3cc731c84f2..dc877570445 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -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 \
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7f1418de522..435b5c070d8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index e9a35bba441..07528cda1fc 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -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))
{