Commit c271ca67 by Uros Bizjak

re PR target/64113 (Gcc on Alpha: Error: No lda !gpdisp!282 was found)

	PR target/64113
	* config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
	using post-reload splitter.  Use peephole2 pass instead.
	(call_value_osf_tlsldm): Ditto.
	(TLS_CALL): New int iterator.
	(tls): New int attribute.
	(call_value_osf_<tls>): Merge insn pattern from call_value_osf_tlsgd
	and call_value_tlsldm using TLS_CALL int iterator.

From-SVN: r218264
parent 1c9b0448
2014-12-02 Uros Bizjak <ubizjak@gmail.com>
PR target/64113
* config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
using post-reload splitter. Use peephole2 pass instead.
(call_value_osf_tlsldm): Ditto.
(TLS_CALL): New int iterator.
(tls): New int attribute.
(call_value_osf_<tls>): Merge insn pattern from call_value_osf_tlsgd
and call_value_tlsldm using TLS_CALL int iterator.
2014-12-02 Richard Biener <rguenther@suse.de> 2014-12-02 Richard Biener <rguenther@suse.de>
Prathamesh Kulkarni <bilbotheelffriend@gmail.com> Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
* genmatch.c: Include hash-set.h. * genmatch.c: Include hash-set.h.
(fatal_at): Add source_location overload. (fatal_at): Add source_location overload.
...@@ -45,7 +56,7 @@ ...@@ -45,7 +56,7 @@
2014-12-01 Segher Boessenkool <segher@kernel.crashing.org> 2014-12-01 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/59278 PR rtl-optimization/59278
combine (reg_dead_at_p): Consider REG_UNUSED notes. * combine (reg_dead_at_p): Consider REG_UNUSED notes.
2014-12-01 Segher Boessenkool <segher@kernel.crashing.org> 2014-12-01 Segher Boessenkool <segher@kernel.crashing.org>
...@@ -5984,16 +5984,38 @@ ...@@ -5984,16 +5984,38 @@
[(set_attr "type" "jsr") [(set_attr "type" "jsr")
(set_attr "length" "*,*,8")]) (set_attr "length" "*,*,8")])
(define_insn_and_split "call_value_osf_tlsgd" (define_int_iterator TLS_CALL
[UNSPEC_TLSGD_CALL
UNSPEC_TLSLDM_CALL])
(define_int_attr tls
[(UNSPEC_TLSGD_CALL "tlsgd")
(UNSPEC_TLSLDM_CALL "tlsldm")])
(define_insn "call_value_osf_<tls>"
[(set (match_operand 0) [(set (match_operand 0)
(call (mem:DI (match_operand:DI 1 "symbolic_operand")) (call (mem:DI (match_operand:DI 1 "symbolic_operand"))
(const_int 0))) (const_int 0)))
(unspec [(match_operand:DI 2 "const_int_operand")] UNSPEC_TLSGD_CALL) (unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
(use (reg:DI 29)) (use (reg:DI 29))
(clobber (reg:DI 26))] (clobber (reg:DI 26))]
"HAVE_AS_TLS" "HAVE_AS_TLS"
"#" "ldq $27,%1($29)\t\t!literal!%2\;jsr $26,($27),%1\t\t!lituse_<tls>!%2\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*"
"&& reload_completed" [(set_attr "type" "jsr")
(set_attr "length" "16")])
;; We must use peep2 instead of a split because we need accurate life
;; information for $gp.
(define_peephole2
[(parallel
[(set (match_operand 0)
(call (mem:DI (match_operand:DI 1 "symbolic_operand"))
(const_int 0)))
(unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
(use (reg:DI 29))
(clobber (reg:DI 26))])]
"HAVE_AS_TLS && reload_completed
&& peep2_regno_dead_p (1, 29)"
[(set (match_dup 3) [(set (match_dup 3)
(unspec:DI [(match_dup 5) (unspec:DI [(match_dup 5)
(match_dup 1) (match_dup 1)
...@@ -6001,10 +6023,9 @@ ...@@ -6001,10 +6023,9 @@
(parallel [(set (match_dup 0) (parallel [(set (match_dup 0)
(call (mem:DI (match_dup 3)) (call (mem:DI (match_dup 3))
(const_int 0))) (const_int 0)))
(set (match_dup 5) (use (match_dup 5))
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP1))
(use (match_dup 1)) (use (match_dup 1))
(use (unspec [(match_dup 2)] UNSPEC_TLSGD_CALL)) (use (unspec [(match_dup 2)] TLS_CALL))
(clobber (reg:DI 26))]) (clobber (reg:DI 26))])
(set (match_dup 5) (set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))] (unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))]
...@@ -6012,19 +6033,18 @@ ...@@ -6012,19 +6033,18 @@
operands[3] = gen_rtx_REG (Pmode, 27); operands[3] = gen_rtx_REG (Pmode, 27);
operands[4] = GEN_INT (alpha_next_sequence_number++); operands[4] = GEN_INT (alpha_next_sequence_number++);
operands[5] = pic_offset_table_rtx; operands[5] = pic_offset_table_rtx;
} })
[(set_attr "type" "multi")])
(define_insn_and_split "call_value_osf_tlsldm" (define_peephole2
[(set (match_operand 0) [(parallel
(call (mem:DI (match_operand:DI 1 "symbolic_operand")) [(set (match_operand 0)
(const_int 0))) (call (mem:DI (match_operand:DI 1 "symbolic_operand"))
(unspec [(match_operand:DI 2 "const_int_operand")] UNSPEC_TLSLDM_CALL) (const_int 0)))
(use (reg:DI 29)) (unspec [(match_operand:DI 2 "const_int_operand")] TLS_CALL)
(clobber (reg:DI 26))] (use (reg:DI 29))
"HAVE_AS_TLS" (clobber (reg:DI 26))])]
"#" "HAVE_AS_TLS && reload_completed
"&& reload_completed" && !peep2_regno_dead_p (1, 29)"
[(set (match_dup 3) [(set (match_dup 3)
(unspec:DI [(match_dup 5) (unspec:DI [(match_dup 5)
(match_dup 1) (match_dup 1)
...@@ -6035,7 +6055,7 @@ ...@@ -6035,7 +6055,7 @@
(set (match_dup 5) (set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP1)) (unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP1))
(use (match_dup 1)) (use (match_dup 1))
(use (unspec [(match_dup 2)] UNSPEC_TLSLDM_CALL)) (use (unspec [(match_dup 2)] TLS_CALL))
(clobber (reg:DI 26))]) (clobber (reg:DI 26))])
(set (match_dup 5) (set (match_dup 5)
(unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))] (unspec:DI [(match_dup 5) (match_dup 4)] UNSPEC_LDGP2))]
...@@ -6043,8 +6063,7 @@ ...@@ -6043,8 +6063,7 @@
operands[3] = gen_rtx_REG (Pmode, 27); operands[3] = gen_rtx_REG (Pmode, 27);
operands[4] = GEN_INT (alpha_next_sequence_number++); operands[4] = GEN_INT (alpha_next_sequence_number++);
operands[5] = pic_offset_table_rtx; operands[5] = pic_offset_table_rtx;
} })
[(set_attr "type" "multi")])
(define_insn "*call_value_osf_1" (define_insn "*call_value_osf_1"
[(set (match_operand 0) [(set (match_operand 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment