* [committed] hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS
@ 2024-03-23 13:52 John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2024-03-23 13:52 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 2117 bytes --]
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed
to trunk.
Dave
---
hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS
This bug was hidden since LO_SUM DLTIND14R addresses are normally
handled by the A constraint in the move patterns.
2024-03-23 John David Anglin <danglin@gcc.gnu.org>
gcc/ChangeLog:
* config/pa/pa.cc (pa_output_global_address): Handle
UNSPEC_DLTIND14R addresses.
* config/pa/pa.h (PRINT_OPERAND_ADDRESS): Output "RT'" for
UNSPEC_DLTIND14R address.
diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc
index d7666103de8..f9b1906efb4 100644
--- a/gcc/config/pa/pa.cc
+++ b/gcc/config/pa/pa.cc
@@ -5784,7 +5784,12 @@ pa_output_global_address (FILE *file, rtx x, int round_constant)
if (GET_CODE (x) == HIGH)
x = XEXP (x, 0);
- if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode))
+ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_DLTIND14R)
+ {
+ x = XVECEXP (x, 0, 0);
+ output_addr_const (file, x);
+ }
+ else if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode))
output_addr_const (file, x);
else if (GET_CODE (x) == SYMBOL_REF && !flag_pic)
{
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 403f16c5cb5..127a0d1966d 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1247,12 +1247,15 @@ do { \
reg_names [REGNO (XEXP (addr, 0))]); \
break; \
case LO_SUM: \
- if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \
+ if (GET_CODE (XEXP (addr, 1)) == UNSPEC \
+ && XINT (XEXP (addr, 1), 1) == UNSPEC_DLTIND14R) \
+ fputs ("RT'", FILE); \
+ else if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \
fputs ("R'", FILE); \
else if (flag_pic == 0) \
fputs ("RR'", FILE); \
else \
- fputs ("RT'", FILE); \
+ gcc_unreachable (); \
pa_output_global_address (FILE, XEXP (addr, 1), 0); \
fputs ("(", FILE); \
output_operand (XEXP (addr, 0), 0); \
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-23 13:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 13:52 [committed] hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).