This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR42861, VTA] bind values to expressions upon MO_VAL_USE
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Feb 2010 10:21:22 -0800
- Subject: Re: [PR42861, VTA] bind values to expressions upon MO_VAL_USE
- References: <4B606A19.80008@redhat.com> <201001281950.o0SJoqe16769@lucas.cup.hp.com> <20100128201220.GI2817@tyan-ft48-01.lab.bos.redhat.com> <20100202193924.GA6056@hiauly1.hia.nrc.ca>
- Reply-to: sje at cup dot hp dot com
Here is a patch to fix PR target/42924, the PA64 bootstrap failure that
started with r156292, the patch to fix PR debug/42861. It is based on
the patch Jakub sent me but returns an indirect reference (mem...)
instead of a direct one because that is what UNSPEC_DLTIND14R returns.
Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11 with no
regressions.
OK to check in?
Steve Ellcey
sje@cup.hp.com
2010-02-04 Steve Ellcey <sje@cup.hp.com>
PR target/42924
* config/pa/pa.c (TARGET_DELEGITIMIZE_ADDRESS): Redefine.
(pa_delegitimize_address): New function.
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 156489)
+++ config/pa/pa.c (working copy)
@@ -167,6 +167,7 @@ static enum machine_mode pa_promote_func
static void pa_asm_trampoline_template (FILE *);
static void pa_trampoline_init (rtx, tree, rtx);
static rtx pa_trampoline_adjust_address (rtx);
+static rtx pa_delegitimize_address (rtx);
/* The following extra sections are only used for SOM. */
static GTY(()) section *som_readonly_data_section;
@@ -339,6 +340,8 @@ static size_t n_deferred_plabels = 0;
#define TARGET_TRAMPOLINE_INIT pa_trampoline_init
#undef TARGET_TRAMPOLINE_ADJUST_ADDRESS
#define TARGET_TRAMPOLINE_ADJUST_ADDRESS pa_trampoline_adjust_address
+#undef TARGET_DELEGITIMIZE_ADDRESS
+#define TARGET_DELEGITIMIZE_ADDRESS pa_delegitimize_address
struct gcc_target targetm = TARGET_INITIALIZER;
^L
@@ -9994,5 +9997,17 @@ pa_trampoline_adjust_address (rtx addr)
addr = memory_address (Pmode, plus_constant (addr, 46));
return addr;
}
+
+static rtx
+pa_delegitimize_address (rtx orig_x)
+{
+ rtx x = delegitimize_mem_from_attrs (orig_x);
+
+ if (GET_CODE (x) == LO_SUM
+ && GET_CODE (XEXP (x, 1)) == UNSPEC
+ && XINT (XEXP (x, 1), 1) == UNSPEC_DLTIND14R)
+ return gen_const_mem (Pmode, XVECEXP (XEXP (x, 1), 0, 0));
+ return x;
+}
^L
#include "gt-pa.h"