summaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.md
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-23 06:37:23 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-23 06:37:23 +0000
commitb60f0749927261334c21891aa8cd76349029b361 (patch)
tree5c0256af6368b27411a55e15e137d7e09aea0433 /gcc/config/sh/sh.md
parent393fac7b1fdbbfbe75b3d5edc177cb6062ac7366 (diff)
downloadgcc-b60f0749927261334c21891aa8cd76349029b361.tar.gz
* final.c (output_addr_const) [LABEL_REF]: Simplify.
[MINUS]: Enclose non-CONST_INTs in parentheses. [default]: Try OUTPUT_ADDR_CONST_EXTRA. * tm.texi (OUTPUT_ADDR_CONST_EXTRA): Document it. * varasm.c (decode_rtx_const) [CONST]: If it's not something PLUS or MINUS a CONST_INT, use the whole CONST with offset 0 instead of abort()ing. * sh.c (output_pic_addr_const): Removed. Fixed all callers. * sh.h (OUTPUT_ADDR_CONST_EXTRA): New. Handle the UNSPECs formerly handled in output_pic_addr_const. * sh.md (sym_label2reg, symPLT_label2reg): Enclose UNSPEC operands of MINUS in CONSTs so that decode_rtx_const() will accept them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/sh.md')
-rw-r--r--gcc/config/sh/sh.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 34649e0c691..549c7e72e0a 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -3596,7 +3596,7 @@
(define_expand "sym_label2reg"
[(set (match_operand:SI 0 "" "")
(const (minus:SI
- (unspec [(match_operand:SI 1 "" "")] UNSPEC_PIC)
+ (const (unspec [(match_operand:SI 1 "" "")] UNSPEC_PIC))
(const (plus:SI
(unspec [(label_ref (match_operand:SI 2 "" ""))]
UNSPEC_PIC)
@@ -3629,12 +3629,13 @@
(define_expand "symPLT_label2reg"
[(set (match_operand:SI 0 "" "")
(const (minus:SI
- (plus:SI (pc)
- (unspec [(match_operand:SI 1 "" "")] UNSPEC_PLT))
- (const
- (plus:SI
- (unspec [(label_ref (match_operand:SI 2 "" ""))] UNSPEC_PIC)
- (const_int 2))))))
+ (const (plus:SI
+ (unspec [(match_operand:SI 1 "" "")] UNSPEC_PLT)
+ (pc)))
+ (const (plus:SI
+ (unspec [(label_ref (match_operand:SI 2 "" ""))]
+ UNSPEC_PIC)
+ (const_int 2))))))
(use (match_dup 3))]
;; Even though the PIC register is not really used by the call
;; sequence in which this is expanded, the PLT code assumes the PIC