Commit 736f566a by Richard Henderson Committed by Richard Henderson

alpha.md: Use define_constants for unspec values.

        * config/alpha/alpha.md: Use define_constants for unspec values.
        Substitute throughout.

From-SVN: r44012
parent e6290e74
2001-07-14 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.md: Use define_constants for unspec values.
Substitute throughout.
2001-07-14 Tim Josling <tej@melbpc.org.au> 2001-07-14 Tim Josling <tej@melbpc.org.au>
* tree.def (EXPON_EXPR) remove. Never supported anyway. * tree.def (EXPON_EXPR) remove. Never supported anyway.
......
...@@ -23,27 +23,31 @@ ...@@ -23,27 +23,31 @@
;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
;; Uses of UNSPEC in this file: ;; Uses of UNSPEC in this file:
;;
;; 0 arg_home (define_constants
;; 1 cttz [(UNSPEC_ARG_HOME 0)
;; 2 insxh (UNSPEC_CTTZ 1)
;; 3 mskxh (UNSPEC_INSXH 2)
;; 5 cvtql (UNSPEC_MSKXH 3)
;; 6 nt_lda (UNSPEC_CVTQL 4)
;; (UNSPEC_NT_LDA 5)
])
;; UNSPEC_VOLATILE: ;; UNSPEC_VOLATILE:
;;
;; 0 imb (define_constants
;; 1 blockage [(UNSPECV_IMB 0)
;; 2 builtin_setjmp_receiver (UNSPECV_BLOCKAGE 1)
;; 3 builtin_longjmp (UNSPECV_SETJMPR 2) ; builtin_setjmp_receiver
;; 4 trapb (UNSPECV_LONGJMP 3) ; builtin_longjmp
;; 5 prologue_stack_probe_loop (UNSPECV_TRAPB 4)
;; 6 realign (UNSPECV_PSPL 5) ; prologue_stack_probe_loop
;; 7 exception_receiver (UNSPECV_REALIGN 6)
;; 8 prologue_mcount (UNSPECV_EHR 7) ; exception_receiver
;; 9 prologue_ldgp_1 (UNSPECV_MCOUNT 8)
;; 10 prologue_ldgp_2 (UNSPECV_LDGP1 9)
(UNSPECV_LDGP2 10)
])
;; Processor type -- this attribute must exactly match the processor_type ;; Processor type -- this attribute must exactly match the processor_type
;; enumeration in alpha.h. ;; enumeration in alpha.h.
...@@ -1339,7 +1343,7 @@ ...@@ -1339,7 +1343,7 @@
(define_expand "ffsdi2" (define_expand "ffsdi2"
[(set (match_dup 2) [(set (match_dup 2)
(unspec:DI [(match_operand:DI 1 "register_operand" "")] 1)) (unspec:DI [(match_operand:DI 1 "register_operand" "")] UNSPEC_CTTZ))
(set (match_dup 3) (set (match_dup 3)
(plus:DI (match_dup 2) (const_int 1))) (plus:DI (match_dup 2) (const_int 1)))
(set (match_operand:DI 0 "register_operand" "") (set (match_operand:DI 0 "register_operand" "")
...@@ -1354,7 +1358,7 @@ ...@@ -1354,7 +1358,7 @@
(define_insn "*cttz" (define_insn "*cttz"
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_operand:DI 1 "register_operand" "r")] 1))] (unspec:DI [(match_operand:DI 1 "register_operand" "r")] UNSPEC_CTTZ))]
"TARGET_CIX" "TARGET_CIX"
"cttz %1,%0" "cttz %1,%0"
; EV6 calls all mvi and cttz/ctlz/popc class imisc, so just ; EV6 calls all mvi and cttz/ctlz/popc class imisc, so just
...@@ -1877,7 +1881,8 @@ ...@@ -1877,7 +1881,8 @@
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 1 "register_operand" "r")
(match_operand:DI 2 "mode_width_operand" "n") (match_operand:DI 2 "mode_width_operand" "n")
(match_operand:DI 3 "reg_or_8bit_operand" "rI")] 2))] (match_operand:DI 3 "reg_or_8bit_operand" "rI")]
UNSPEC_INSXH))]
"" ""
"ins%M2h %1,%3,%0" "ins%M2h %1,%3,%0"
[(set_attr "type" "shift")]) [(set_attr "type" "shift")])
...@@ -1903,7 +1908,8 @@ ...@@ -1903,7 +1908,8 @@
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_operand:DI 1 "register_operand" "r") (unspec:DI [(match_operand:DI 1 "register_operand" "r")
(match_operand:DI 2 "mode_width_operand" "n") (match_operand:DI 2 "mode_width_operand" "n")
(match_operand:DI 3 "reg_or_8bit_operand" "rI")] 3))] (match_operand:DI 3 "reg_or_8bit_operand" "rI")]
UNSPEC_MSKXH))]
"" ""
"msk%M2h %1,%3,%0" "msk%M2h %1,%3,%0"
[(set_attr "type" "shift")]) [(set_attr "type" "shift")])
...@@ -2093,7 +2099,8 @@ ...@@ -2093,7 +2099,8 @@
(define_insn "*cvtql" (define_insn "*cvtql"
[(set (match_operand:SI 0 "register_operand" "=f") [(set (match_operand:SI 0 "register_operand" "=f")
(unspec:SI [(match_operand:DI 1 "reg_or_fp0_operand" "fG")] 5))] (unspec:SI [(match_operand:DI 1 "reg_or_fp0_operand" "fG")]
UNSPEC_CVTQL))]
"TARGET_FP" "TARGET_FP"
"cvtql%` %R1,%0" "cvtql%` %R1,%0"
[(set_attr "type" "fadd") [(set_attr "type" "fadd")
...@@ -2108,7 +2115,7 @@ ...@@ -2108,7 +2115,7 @@
"#" "#"
"&& reload_completed" "&& reload_completed"
[(set (match_dup 2) (fix:DI (match_dup 1))) [(set (match_dup 2) (fix:DI (match_dup 1)))
(set (match_dup 3) (unspec:SI [(match_dup 2)] 5)) (set (match_dup 3) (unspec:SI [(match_dup 2)] UNSPEC_CVTQL))
(set (match_dup 0) (match_dup 3))] (set (match_dup 0) (match_dup 3))]
"" ""
[(set_attr "type" "fadd") [(set_attr "type" "fadd")
...@@ -2122,7 +2129,7 @@ ...@@ -2122,7 +2129,7 @@
"#" "#"
"&& reload_completed" "&& reload_completed"
[(set (match_dup 2) (fix:DI (match_dup 1))) [(set (match_dup 2) (fix:DI (match_dup 1)))
(set (match_dup 3) (unspec:SI [(match_dup 2)] 5)) (set (match_dup 3) (unspec:SI [(match_dup 2)] UNSPEC_CVTQL))
(set (match_dup 0) (match_dup 3))] (set (match_dup 0) (match_dup 3))]
;; Due to REG_CANNOT_CHANGE_SIZE issues, we cannot simply use SUBREG. ;; Due to REG_CANNOT_CHANGE_SIZE issues, we cannot simply use SUBREG.
"operands[3] = gen_rtx_REG (SImode, REGNO (operands[2]));" "operands[3] = gen_rtx_REG (SImode, REGNO (operands[2]));"
...@@ -2157,7 +2164,7 @@ ...@@ -2157,7 +2164,7 @@
"#" "#"
"&& reload_completed" "&& reload_completed"
[(set (match_dup 2) (fix:DI (float_extend:DF (match_dup 1)))) [(set (match_dup 2) (fix:DI (float_extend:DF (match_dup 1))))
(set (match_dup 3) (unspec:SI [(match_dup 2)] 5)) (set (match_dup 3) (unspec:SI [(match_dup 2)] UNSPEC_CVTQL))
(set (match_dup 0) (match_dup 3))] (set (match_dup 0) (match_dup 3))]
"" ""
[(set_attr "type" "fadd") [(set_attr "type" "fadd")
...@@ -2172,7 +2179,7 @@ ...@@ -2172,7 +2179,7 @@
"#" "#"
"&& reload_completed" "&& reload_completed"
[(set (match_dup 2) (fix:DI (float_extend:DF (match_dup 1)))) [(set (match_dup 2) (fix:DI (float_extend:DF (match_dup 1))))
(set (match_dup 3) (unspec:SI [(match_dup 2)] 5)) (set (match_dup 3) (unspec:SI [(match_dup 2)] UNSPEC_CVTQL))
(set (match_dup 0) (match_dup 3))] (set (match_dup 0) (match_dup 3))]
;; Due to REG_CANNOT_CHANGE_SIZE issues, we cannot simply use SUBREG. ;; Due to REG_CANNOT_CHANGE_SIZE issues, we cannot simply use SUBREG.
"operands[3] = gen_rtx_REG (SImode, REGNO (operands[2]));" "operands[3] = gen_rtx_REG (SImode, REGNO (operands[2]));"
...@@ -4372,7 +4379,7 @@ ...@@ -4372,7 +4379,7 @@
;; all of memory. This blocks insns from being moved across this point. ;; all of memory. This blocks insns from being moved across this point.
(define_insn "blockage" (define_insn "blockage"
[(unspec_volatile [(const_int 0)] 1)] [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
"" ""
"" ""
[(set_attr "length" "0")]) [(set_attr "length" "0")])
...@@ -4561,7 +4568,7 @@ ...@@ -4561,7 +4568,7 @@
;; if we need a GP. Use ibr instead since it has the same EV5 scheduling ;; if we need a GP. Use ibr instead since it has the same EV5 scheduling
;; characteristics. ;; characteristics.
(define_insn "imb" (define_insn "imb"
[(unspec_volatile [(const_int 0)] 0)] [(unspec_volatile [(const_int 0)] UNSPECV_IMB)]
"" ""
"call_pal 0x86" "call_pal 0x86"
[(set_attr "type" "ibr")]) [(set_attr "type" "ibr")])
...@@ -5820,7 +5827,8 @@ ...@@ -5820,7 +5827,8 @@
(define_insn "prologue_stack_probe_loop" (define_insn "prologue_stack_probe_loop"
[(unspec_volatile [(match_operand:DI 0 "register_operand" "r") [(unspec_volatile [(match_operand:DI 0 "register_operand" "r")
(match_operand:DI 1 "register_operand" "r")] 5)] (match_operand:DI 1 "register_operand" "r")]
UNSPECV_PSPL)]
"" ""
"* "*
{ {
...@@ -5850,19 +5858,19 @@ ...@@ -5850,19 +5858,19 @@
;; with them. ;; with them.
(define_expand "prologue_ldgp" (define_expand "prologue_ldgp"
[(unspec_volatile [(const_int 0)] 9) [(unspec_volatile [(const_int 0)] UNSPECV_LDGP1)
(unspec_volatile [(const_int 0)] 10)] (unspec_volatile [(const_int 0)] UNSPECV_LDGP2)]
"" ""
"") "")
(define_insn "*prologue_ldgp_1" (define_insn "*prologue_ldgp_1"
[(unspec_volatile [(const_int 0)] 9)] [(unspec_volatile [(const_int 0)] UNSPECV_LDGP1)]
"! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" ""
"ldgp $29,0($27)\\n$%~..ng:") "ldgp $29,0($27)\\n$%~..ng:")
(define_insn "*prologue_ldgp_2" (define_insn "*prologue_ldgp_2"
[(unspec_volatile [(const_int 0)] 10)] [(unspec_volatile [(const_int 0)] UNSPECV_LDGP2)]
"! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" ""
"") "")
;; The _mcount profiling hook has special calling conventions, and ;; The _mcount profiling hook has special calling conventions, and
...@@ -5870,7 +5878,7 @@ ...@@ -5870,7 +5878,7 @@
;; hide the fact this is a call at all. ;; hide the fact this is a call at all.
(define_insn "prologue_mcount" (define_insn "prologue_mcount"
[(unspec_volatile [(const_int 0)] 8)] [(unspec_volatile [(const_int 0)] UNSPECV_MCOUNT)]
"" ""
"lda $28,_mcount\;jsr $28,($28),_mcount" "lda $28,_mcount\;jsr $28,($28),_mcount"
[(set_attr "type" "multi") [(set_attr "type" "multi")
...@@ -5906,7 +5914,8 @@ ...@@ -5906,7 +5914,8 @@
(define_insn "nt_lda" (define_insn "nt_lda"
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_dup 0) (unspec:DI [(match_dup 0)
(match_operand:DI 1 "const_int_operand" "n")] 6))] (match_operand:DI 1 "const_int_operand" "n")]
UNSPEC_NT_LDA))]
"" ""
"lda %0,%1(%0)") "lda %0,%1(%0)")
...@@ -5940,27 +5949,28 @@ ...@@ -5940,27 +5949,28 @@
;; that register renaming cannot foil our cunning plan with $27. ;; that register renaming cannot foil our cunning plan with $27.
(define_insn "builtin_longjmp_internal" (define_insn "builtin_longjmp_internal"
[(set (pc) [(set (pc)
(unspec_volatile [(match_operand:DI 0 "register_operand" "c")] 3))] (unspec_volatile [(match_operand:DI 0 "register_operand" "c")]
UNSPECV_LONGJMP))]
"" ""
"jmp $31,(%0),0" "jmp $31,(%0),0"
[(set_attr "type" "ibr")]) [(set_attr "type" "ibr")])
(define_insn "*builtin_setjmp_receiver_sub_label" (define_insn "*builtin_setjmp_receiver_sub_label"
[(unspec_volatile [(label_ref (match_operand 0 "" ""))] 2)] [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
"! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT && TARGET_AS_CAN_SUBTRACT_LABELS" "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT && TARGET_AS_CAN_SUBTRACT_LABELS"
"\\n$LSJ%=:\;ldgp $29,$LSJ%=-%l0($27)" "\\n$LSJ%=:\;ldgp $29,$LSJ%=-%l0($27)"
[(set_attr "length" "8") [(set_attr "length" "8")
(set_attr "type" "multi")]) (set_attr "type" "multi")])
(define_insn "builtin_setjmp_receiver" (define_insn "builtin_setjmp_receiver"
[(unspec_volatile [(label_ref (match_operand 0 "" ""))] 2)] [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
"! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT"
"br $29,$LSJ%=\\n$LSJ%=:\;ldgp $29,0($29)" "br $29,$LSJ%=\\n$LSJ%=:\;ldgp $29,0($29)"
[(set_attr "length" "12") [(set_attr "length" "12")
(set_attr "type" "multi")]) (set_attr "type" "multi")])
(define_expand "exception_receiver" (define_expand "exception_receiver"
[(unspec_volatile [(match_dup 0)] 7)] [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
"! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT"
" "
{ {
...@@ -5971,7 +5981,7 @@ ...@@ -5971,7 +5981,7 @@
}") }")
(define_insn "*exception_receiver_1" (define_insn "*exception_receiver_1"
[(unspec_volatile [(const_int 0)] 7)] [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
"! TARGET_LD_BUGGY_LDGP" "! TARGET_LD_BUGGY_LDGP"
"ldgp $29,0($26)" "ldgp $29,0($26)"
[(set_attr "length" "8") [(set_attr "length" "8")
...@@ -5982,7 +5992,8 @@ ...@@ -5982,7 +5992,8 @@
;; as dead code unless it is represented as a volatile unspec. ;; as dead code unless it is represented as a volatile unspec.
(define_insn "*exception_receiver_2" (define_insn "*exception_receiver_2"
[(unspec_volatile [(match_operand:DI 0 "nonimmediate_operand" "r,m")] 7)] [(unspec_volatile [(match_operand:DI 0 "nonimmediate_operand" "r,m")]
UNSPECV_EHR)]
"TARGET_LD_BUGGY_LDGP" "TARGET_LD_BUGGY_LDGP"
"@ "@
mov %0,$29 mov %0,$29
...@@ -5990,15 +6001,15 @@ ...@@ -5990,15 +6001,15 @@
[(set_attr "type" "ilog,ild")]) [(set_attr "type" "ilog,ild")])
(define_expand "nonlocal_goto_receiver" (define_expand "nonlocal_goto_receiver"
[(unspec_volatile [(const_int 0)] 1) [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
(set (reg:DI 27) (mem:DI (reg:DI 29))) (set (reg:DI 27) (mem:DI (reg:DI 29)))
(unspec_volatile [(const_int 0)] 1) (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
(use (reg:DI 27))] (use (reg:DI 27))]
"TARGET_OPEN_VMS" "TARGET_OPEN_VMS"
"") "")
(define_insn "arg_home" (define_insn "arg_home"
[(unspec [(const_int 0)] 0) [(unspec [(const_int 0)] UNSPEC_ARG_HOME)
(use (reg:DI 1)) (use (reg:DI 1))
(use (reg:DI 25)) (use (reg:DI 25))
(use (reg:DI 16)) (use (reg:DI 16))
...@@ -6026,7 +6037,7 @@ ...@@ -6026,7 +6037,7 @@
;; by alpha_reorg. ;; by alpha_reorg.
(define_insn "trapb" (define_insn "trapb"
[(unspec_volatile [(const_int 0)] 4)] [(unspec_volatile [(const_int 0)] UNSPECV_TRAPB)]
"" ""
"trapb" "trapb"
[(set_attr "type" "misc")]) [(set_attr "type" "misc")])
...@@ -6052,7 +6063,8 @@ ...@@ -6052,7 +6063,8 @@
"unop") "unop")
(define_insn "realign" (define_insn "realign"
[(unspec_volatile [(match_operand 0 "immediate_operand" "i")] 6)] [(unspec_volatile [(match_operand 0 "immediate_operand" "i")]
UNSPECV_REALIGN)]
"" ""
".align %0 #realign") ".align %0 #realign")
......
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