|
From: Sean M. <Sea...@su...> - 2003-03-28 16:58:25
|
The code in movsi_const looked wrong. A tested patch is now attached.
--- src/gcc/config/sh/sh.md@@/main/SH5GCC-CVS20020529.1800-int/renneckej-pic-030324/0 Mon Mar 24 15:50:32 2003
+++ src/gcc/config/sh/sh.md Mon Mar 24 16:35:21 2003
@@ -3651,11 +3651,20 @@
if (GET_CODE (operands[1]) == LABEL_REF
&& GET_CODE (XEXP (operands[1], 0)) == CODE_LABEL)
LABEL_NUSES (XEXP (operands[1], 0)) += 2;
- else if (GOTOFF_P (operands[1])
- && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == LABEL_REF
- && (GET_CODE (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0))
- == CODE_LABEL))
- LABEL_NUSES (XEXP (XVECEXP (XEXP (operands[1], 0), 0, 0), 0)) += 2;
+ else if (GOTOFF_P (operands[1]))
+ {
+ rtx unspec = XEXP (operands[1], 0);
+
+ if (! UNSPEC_GOTOFF_P (unspec))
+ {
+ unspec = XEXP (unspec, 0);
+ if (! UNSPEC_GOTOFF_P (unspec))
+ abort ();
+ }
+ if (GET_CODE (XVECEXP (unspec , 0, 0)) == LABEL_REF
+ && (GET_CODE (XEXP (XVECEXP (unspec, 0, 0), 0)) == CODE_LABEL))
+ LABEL_NUSES (XEXP (XVECEXP (unspec, 0, 0), 0)) += 2;
+ }
}")
(define_expand "movsi_const_16bit"
--
------------------------------------------------------------------------
| Sean McGoogan, | E-mail: Sea...@Su... |
| SuperH (UK) Ltd., | |
| 2410 Aztec West, | Direct: +44 (0) 1454 465670 |
| Almondsbury, | Main: +44 (0) 1454 465600 |
| Bristol, BS32 4QX, U.K. | Fax: +44 (0) 1454 465601 |
------------------------------------------------------------------------
|