aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <devans@gcc.gnu.org>1997-10-19 16:46:47 +0000
committerDoug Evans <devans@gcc.gnu.org>1997-10-19 16:46:47 +0000
commit200d7a3251b3acc918c63be206ef367a139fede9 (patch)
tree279d8d03217f8bd753041bb893a6cf3fbcb83753 /gcc
parent4a5121b59a5b1960d3e0a2803b03a3e5c2ad29d3 (diff)
downloadgcc-200d7a3251b3acc918c63be206ef367a139fede9.zip
gcc-200d7a3251b3acc918c63be206ef367a139fede9.tar.gz
gcc-200d7a3251b3acc918c63be206ef367a139fede9.tar.bz2
Undo cvs entry 1.4 "Reorg sethi_{hi,si} patterns." and add comment why.
From-SVN: r16080
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.md34
1 files changed, 18 insertions, 16 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 2aac850..f45612e 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -1479,22 +1479,6 @@
;; Esoteric move insns (lo_sum, high, pic).
-(define_insn "*sethi_hi"
- [(set (match_operand:HI 0 "register_operand" "=r")
- (high:HI (match_operand 1 "" "")))]
- "check_pic (1)"
- "sethi %%hi(%a1),%0"
- [(set_attr "type" "move")
- (set_attr "length" "1")])
-
-(define_insn "*sethi_si"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (high:SI (match_operand 1 "" "")))]
- "check_pic (1)"
- "sethi %%hi(%a1),%0"
- [(set_attr "type" "move")
- (set_attr "length" "1")])
-
(define_insn "*lo_sum_si"
[(set (match_operand:SI 0 "register_operand" "=r")
(lo_sum:SI (match_operand:SI 1 "register_operand" "r")
@@ -1617,6 +1601,24 @@
(const_int 2)
(const_int 5)))])
+(define_insn "*sethi_hi"
+ [(set (match_operand:HI 0 "register_operand" "=r")
+ (high:HI (match_operand 1 "" "")))]
+ "check_pic (1)"
+ "sethi %%hi(%a1),%0"
+ [(set_attr "type" "move")
+ (set_attr "length" "1")])
+
+;; This must appear after the PIC sethi so that the PIC unspec will not
+;; be matched as part of the operand.
+(define_insn "*sethi_si"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (high:SI (match_operand 1 "" "")))]
+ "check_pic (1)"
+ "sethi %%hi(%a1),%0"
+ [(set_attr "type" "move")
+ (set_attr "length" "1")])
+
(define_insn "*lo_sum_di_sp32"
[(set (match_operand:DI 0 "register_operand" "=r")
(lo_sum:DI (match_operand:DI 1 "register_operand" "0")