summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-01 21:51:13 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-01 21:51:13 +0000
commit6e3265061e41f7c9344874ddfbc100a3a00c3f6f (patch)
tree09777e2a3ebda4ff012aec58bf5140c64a6bbe37 /gcc/dwarf2out.c
parenteda8e89a57c72ab9aae5825f6803ca06bee5a88a (diff)
downloadgcc-6e3265061e41f7c9344874ddfbc100a3a00c3f6f.tar.gz
* system.h: Poison ASM_SIMPLIFY_DWARF_ADDR.
* varasm.c (lookup_constant_def): New function. * rtl.h (lookup_constant_def): Declare it. * dwarf2out.c (loc_descriptor_from_tree): Use it. Use targetm.delegitimize_address, not ASM_SIMPLIFY_DWARF_ADDR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70072 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 91336a12d28..48f0f92c08c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8560,17 +8560,19 @@ loc_descriptor_from_tree (tree loc, int addressp)
case CONSTRUCTOR:
{
- /* Get an RTL for this, which will may have the effect of outputting
- it. This may violates the principle of not having -g affect
- the generated code, but it's in the data segment and it's hard
- to see a case where it won't already have been output. */
- rtx rtl = output_constant_def (loc, 0);
-
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
- rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+ /* Get an RTL for this, if something has been emitted. */
+ rtx rtl = lookup_constant_def (loc);
+ enum machine_mode mode;
+
+ if (GET_CODE (rtl) != MEM)
+ return 0;
+ mode = GET_MODE (rtl);
+ rtl = XEXP (rtl, 0);
+
+ rtl = (*targetm.delegitimize_address) (rtl);
+
indirect_p = 1;
- ret = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (rtl));
+ ret = mem_loc_descriptor (rtl, mode);
break;
}