mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-21 18:15:06 +08:00
microblaze.md: Add expander for simple_return...
* config/microblaze/microblaze.md: Add expander for simple_return, return, add return_internal and simple_return_internal insns. From-SVN: r182725
This commit is contained in:
parent
10b293bbd0
commit
1893a69a50
@ -1,3 +1,8 @@
|
||||
2011-12-29 Michael Eager <eager@eagercon.com>
|
||||
|
||||
* config/microblaze/microblaze.md: Add expander for simple_return,
|
||||
return, add return_internal and simple_return_internal insns.
|
||||
|
||||
2011-12-29 Oleg Endo <olegendo@gcc.gnu.org>
|
||||
|
||||
* config/sh/sh.h (BRANCH_COST): Use sh_branch_cost variable.
|
||||
|
@ -82,6 +82,13 @@
|
||||
;; # instructions (4 bytes each)
|
||||
(define_attr "length" "" (const_int 4))
|
||||
|
||||
(define_code_iterator any_return [return simple_return])
|
||||
|
||||
;; <optab> expands to the name of the optab for a particular code.
|
||||
(define_code_attr optab [(return "return")
|
||||
(simple_return "simple_return")])
|
||||
|
||||
|
||||
;;----------------------------------------------------
|
||||
;; Attribute describing the processor.
|
||||
;;----------------------------------------------------
|
||||
@ -1936,9 +1943,21 @@
|
||||
|
||||
;; Trivial return. Make it look like a normal return insn as that
|
||||
;; allows jump optimizations to work better .
|
||||
(define_insn "return"
|
||||
[(return)]
|
||||
(define_expand "return"
|
||||
[(simple_return)]
|
||||
"microblaze_can_use_return_insn ()"
|
||||
{}
|
||||
)
|
||||
|
||||
(define_expand "simple_return"
|
||||
[(simple_return)]
|
||||
""
|
||||
{}
|
||||
)
|
||||
|
||||
(define_insn "*<optab>"
|
||||
[(any_return)]
|
||||
""
|
||||
{
|
||||
if (microblaze_is_interrupt_handler ())
|
||||
return "rtid\tr14, 0\;%#";
|
||||
@ -1947,15 +1966,14 @@
|
||||
}
|
||||
[(set_attr "type" "jump")
|
||||
(set_attr "mode" "none")
|
||||
(set_attr "length" "4")])
|
||||
(set_attr "length" "4")]
|
||||
)
|
||||
|
||||
;; Normal return.
|
||||
;; We match any mode for the return address, so that this will work with
|
||||
;; both 32 bit and 64 bit targets.
|
||||
|
||||
(define_insn "return_internal"
|
||||
[(parallel [(use (match_operand:SI 0 "register_operand" ""))
|
||||
(return)])]
|
||||
(define_insn "<optab>_internal"
|
||||
[(any_return)
|
||||
(use (match_operand:SI 0 "register_operand" ""))]
|
||||
""
|
||||
{
|
||||
if (microblaze_is_interrupt_handler ())
|
||||
|
Loading…
Reference in New Issue
Block a user