;; ??? This looks ugly because genattrtab won't allow if_then_else or cond
;; inside an le.
(define_attr "short_cbranch_p" "no,yes"
- (cond [(ne (symbol_ref "mdep_reorg_phase <= SH_FIXUP_PCLOAD") (const_int 0))
+ (cond [(match_test "mdep_reorg_phase <= SH_FIXUP_PCLOAD")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 252)) (const_int 506))
(const_string "yes")
- (ne (symbol_ref "NEXT_INSN (PREV_INSN (insn)) != insn") (const_int 0))
+ (match_test "NEXT_INSN (PREV_INSN (insn)) != insn")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 252)) (const_int 508))
(const_string "yes")
(cond [(leu (plus (minus (match_dup 0) (pc)) (const_int 990))
(const_int 1988))
(const_string "yes")
- (ne (symbol_ref "mdep_reorg_phase <= SH_FIXUP_PCLOAD") (const_int 0))
+ (match_test "mdep_reorg_phase <= SH_FIXUP_PCLOAD")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 4092))
(const_int 8186))
(cond [(leu (plus (minus (match_dup 0) (pc)) (const_int 988))
(const_int 1986))
(const_string "yes")
- (ne (symbol_ref "mdep_reorg_phase <= SH_FIXUP_PCLOAD") (const_int 0))
+ (match_test "mdep_reorg_phase <= SH_FIXUP_PCLOAD")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 4090))
(const_int 8184))
] (const_string "no")))
(define_attr "braf_branch_p" "no,yes"
- (cond [(ne (symbol_ref "! TARGET_SH2") (const_int 0))
+ (cond [(match_test "! TARGET_SH2")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 10330))
(const_int 20660))
(const_string "yes")
- (ne (symbol_ref "mdep_reorg_phase <= SH_FIXUP_PCLOAD") (const_int 0))
+ (match_test "mdep_reorg_phase <= SH_FIXUP_PCLOAD")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 32764))
(const_int 65530))
] (const_string "no")))
(define_attr "braf_cbranch_p" "no,yes"
- (cond [(ne (symbol_ref "! TARGET_SH2") (const_int 0))
+ (cond [(match_test "! TARGET_SH2")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 10328))
(const_int 20658))
(const_string "yes")
- (ne (symbol_ref "mdep_reorg_phase <= SH_FIXUP_PCLOAD") (const_int 0))
+ (match_test "mdep_reorg_phase <= SH_FIXUP_PCLOAD")
(const_string "no")
(leu (plus (minus (match_dup 0) (pc)) (const_int 32762))
(const_int 65528))
;; ??? using pc is not computed transitively.
(ne (match_dup 0) (match_dup 0))
(const_int 14)
- (ne (symbol_ref ("flag_pic")) (const_int 0))
+ (match_test "flag_pic")
(const_int 24)
] (const_int 16))
(eq_attr "type" "jump")
(cond [(eq_attr "med_branch_p" "yes")
(const_int 2)
- (and (ne (symbol_ref "prev_nonnote_insn (insn)")
- (const_int 0))
- (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))")
- (symbol_ref "INSN"))
- (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))")
- (symbol_ref "code_for_indirect_jump_scratch"))))
+ (and (match_test "prev_nonnote_insn (insn)")
+ (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))") (symbol_ref "INSN"))
+ (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))") (symbol_ref "code_for_indirect_jump_scratch"))))
(cond [(eq_attr "braf_branch_p" "yes")
(const_int 6)
- (eq (symbol_ref "flag_pic") (const_int 0))
+ (not (match_test "flag_pic"))
(const_int 10)
- (ne (symbol_ref "TARGET_SH2") (const_int 0))
+ (match_test "TARGET_SH2")
(const_int 10)] (const_int 18))
(eq_attr "braf_branch_p" "yes")
(const_int 10)
;; ??? using pc is not computed transitively.
(ne (match_dup 0) (match_dup 0))
(const_int 12)
- (ne (symbol_ref ("flag_pic")) (const_int 0))
+ (match_test "flag_pic")
(const_int 22)
] (const_int 14))
(eq_attr "type" "pt_media")
- (if_then_else (ne (symbol_ref "TARGET_SHMEDIA64") (const_int 0))
+ (if_then_else (match_test "TARGET_SHMEDIA64")
(const_int 20) (const_int 12))
(and (eq_attr "type" "jump_media")
- (ne (symbol_ref "TARGET_SH5_CUT2_WORKAROUND") (const_int 0)))
+ (match_test "TARGET_SH5_CUT2_WORKAROUND"))
(const_int 8)
- ] (if_then_else (ne (symbol_ref "TARGET_SHMEDIA") (const_int 0))
+ ] (if_then_else (match_test "TARGET_SHMEDIA")
(const_int 4)
(const_int 2))))
(define_attr "needs_delay_slot" "yes,no" (const_string "no"))
(define_attr "banked" "yes,no"
- (cond [(eq (symbol_ref "sh_loads_bankedreg_p (insn)")
- (const_int 1))
+ (cond [(match_test "sh_loads_bankedreg_p (insn)")
(const_string "yes")]
(const_string "no")))
;; ??? This should be (nil) instead of (const_int 0)
(define_attr "hit_stack" "yes,no"
- (cond [(eq (symbol_ref "find_regno_note (insn, REG_INC, SP_REG)")
- (const_int 0))
+ (cond [(not (match_test "find_regno_note (insn, REG_INC, SP_REG)"))
(const_string "no")]
(const_string "yes")))
(eq_attr "type" "!pload,prset"))
(and (eq_attr "interrupt_function" "yes")
(ior
- (eq (symbol_ref "TARGET_SH3") (const_int 0))
+ (not (match_test "TARGET_SH3"))
(eq_attr "hit_stack" "no")
(eq_attr "banked" "no"))))) (nil) (nil)])
(define_delay
(and (eq_attr "type" "cbranch")
- (ne (symbol_ref "TARGET_SH2") (const_int 0)))
+ (match_test "TARGET_SH2"))
;; SH2e has a hardware bug that pretty much prohibits the use of
;; annuled delay slots.
[(eq_attr "cond_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
"TARGET_SH1 && ! sh_dynamicalize_shift_p (operands[2])"
"#"
[(set (attr "length")
- (cond [(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 1))
+ (cond [(match_test "shift_insns_rtx (insn)")
(const_string "2")
(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 2))
(const_string "4")
"TARGET_SH1"
"#"
[(set (attr "length")
- (cond [(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 1))
+ (cond [(match_test "shift_insns_rtx (insn)")
(const_string "2")
(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 2))
(const_string "4")]
"TARGET_SH1 && ! sh_dynamicalize_shift_p (operands[2])"
"#"
[(set (attr "length")
- (cond [(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 1))
+ (cond [(match_test "shift_insns_rtx (insn)")
(const_string "2")
(eq (symbol_ref "shift_insns_rtx (insn)") (const_int 2))
(const_string "4")
"TARGET_SH1 && (unsigned)shl_sext_kind (operands[2], operands[3], 0) - 1 < 5"
"#"
[(set (attr "length")
- (cond [(eq (symbol_ref "shl_sext_length (insn)") (const_int 1))
+ (cond [(match_test "shl_sext_length (insn)")
(const_string "2")
(eq (symbol_ref "shl_sext_length (insn)") (const_int 2))
(const_string "4")
ld%M1.uw %m1, %0"
[(set_attr "type" "*,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
ld%M1.ub %m1, %0"
[(set_attr "type" "arith_media,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
ld%M1.uw %m1, %0"
[(set_attr "type" "arith_media,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
ld%M1.ub %m1, %0"
[(set_attr "type" "arith_media,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
fmov.sl %1, %0"
[(set_attr "type" "arith_media,load_media,fpconv_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "extend")))])
ld%M1.w %m1, %0"
[(set_attr "type" "*,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
ld%M1.b %m1, %0"
[(set_attr "type" "*,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
ld%M1.w %m1, %0"
[(set_attr "type" "arith_media,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
(set_attr_alternative "length"
[(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))])])
(define_insn "*extendqisi2_media"
ld%M1.b %m1, %0"
[(set_attr "type" "arith_media,load_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
(set_attr_alternative "length"
[(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))])])
/* It would seem useful to combine the truncXi patterns into the movXi
fmov.s %T1, %0"
[(set_attr "type" "arith_media,store_media,fstore_media,fload_media,fpconv_media,fmove_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "extend")))])
[(set_attr "type" "arith_media,store_media")
(set_attr "length" "8,4")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "extend")))])
st%M0.b %m0, %1"
[(set_attr "type" "arith_media,store")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "extend")))])
;; -------------------------------------------------------------------------
(const_int 4)
(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(const_int 2)
(const_int 2)
(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(const_int 2)
(const_int 2)
[(set_attr "type" "arith_media,arith_media,*,load_media,store_media,fload_media,fstore_media,fload_media,fpconv_media,fmove_media,ptabs_media,gettr_media,pt_media")
(set_attr "length" "4,4,8,4,4,4,4,4,4,4,4,4,12")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
[(set_attr "type" "arith_media,arith_media,*,load_media,store_media,ptabs_media,gettr_media,pt_media")
(set_attr "length" "4,4,8,4,4,4,4,12")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
[(const_int 2)
(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(const_int 2)
(const_int 2)
st%M0.b %m0, %N1"
[(set_attr "type" "arith_media,arith_media,load_media,store_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
st%M0.w %m0, %N1"
[(set_attr "type" "arith_media,arith_media,*,load_media,store_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
;; We can't use 4-byte push/pop on SHcompact, so we have to
;; increment or decrement r15 explicitly.
(if_then_else
- (ne (symbol_ref "TARGET_SHCOMPACT") (const_int 0))
+ (match_test "TARGET_SHCOMPACT")
(const_int 10) (const_int 8))
(if_then_else
- (ne (symbol_ref "TARGET_SHCOMPACT") (const_int 0))
+ (match_test "TARGET_SHCOMPACT")
(const_int 10) (const_int 8))])
(set_attr "type" "fmove,move,pcfload,fload,fstore,pcload,load,store,load,fload")
(set_attr "late_fp_use" "*,*,*,*,yes,*,*,*,*,*")
st%M0.l %m0, %N1"
[(set_attr "type" "fmove_media,fload_media,fpconv_media,arith_media,*,fload_media,fstore_media,load_media,store_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
st%M0.l %m0, %N1"
[(set_attr "type" "arith_media,*,load_media,store_media")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])
(const_int 2)
(const_int 4)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(const_int 2)
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(if_then_else
- (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (match_test "TARGET_SH2A")
(const_int 4) (const_int 2))
(const_int 2)
(const_int 2)
[(set_attr "type" "arith_media,arith_media,*,load_media,store_media")
(set_attr "length" "4,4,16,4,4")
(set (attr "highpart")
- (cond [(ne (symbol_ref "sh_contains_memref_p (insn)") (const_int 0))
+ (cond [(match_test "sh_contains_memref_p (insn)")
(const_string "user")]
(const_string "ignore")))])