aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-12-03 12:12:10 -0800
committerIan Lance Taylor <iant@golang.org>2020-12-03 12:12:10 -0800
commitf012991e2db06cc95f7aac8ecb74a1ac5f51f3d2 (patch)
tree582e5d7b377b6e973666a71960b28a7d11d72b07 /gcc/config/sparc
parent8d703821c69062c0cd255787d793e44f1a95d463 (diff)
parent3089f5feef36810c625b5813370a97b4ecc841f8 (diff)
downloadgcc-f012991e2db06cc95f7aac8ecb74a1ac5f51f3d2.zip
gcc-f012991e2db06cc95f7aac8ecb74a1ac5f51f3d2.tar.gz
gcc-f012991e2db06cc95f7aac8ecb74a1ac5f51f3d2.tar.bz2
Merge from trunk revision 3089f5feef36810c625b5813370a97b4ecc841f8
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r--gcc/config/sparc/predicates.md2
-rw-r--r--gcc/config/sparc/sparc-protos.h1
-rw-r--r--gcc/config/sparc/sparc.c85
-rw-r--r--gcc/config/sparc/sparc.md183
4 files changed, 162 insertions, 109 deletions
diff --git a/gcc/config/sparc/predicates.md b/gcc/config/sparc/predicates.md
index 3d49972..42316ad 100644
--- a/gcc/config/sparc/predicates.md
+++ b/gcc/config/sparc/predicates.md
@@ -296,6 +296,8 @@
if (arith_double_operand (op, mode))
return true;
+ /* Turning an add/sub instruction into the other changes the Carry flag
+ so the 4096 trick cannot be used for double operations in 32-bit mode. */
return TARGET_ARCH64 && const_4096_operand (op, mode);
})
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
index f525cd7..5f9999a 100644
--- a/gcc/config/sparc/sparc-protos.h
+++ b/gcc/config/sparc/sparc-protos.h
@@ -86,7 +86,6 @@ extern int mems_ok_for_ldd_peep (rtx, rtx, rtx);
extern rtx widen_mem_for_ldd_peep (rtx, rtx, machine_mode);
extern int empty_delay_slot (rtx_insn *);
extern int emit_cbcond_nop (rtx_insn *);
-extern int eligible_for_call_delay (rtx_insn *);
extern int eligible_for_return_delay (rtx_insn *);
extern int eligible_for_sibcall_delay (rtx_insn *);
extern int emit_move_sequence (rtx, machine_mode);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2780b42..ec0921b 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -708,6 +708,7 @@ static HOST_WIDE_INT sparc_constant_alignment (const_tree, HOST_WIDE_INT);
static bool sparc_vectorize_vec_perm_const (machine_mode, rtx, rtx, rtx,
const vec_perm_indices &);
static bool sparc_can_follow_jump (const rtx_insn *, const rtx_insn *);
+static HARD_REG_SET sparc_zero_call_used_regs (HARD_REG_SET);
#ifdef SUBTARGET_ATTRIBUTE_TABLE
/* Table of valid machine attributes. */
@@ -959,6 +960,9 @@ char sparc_hard_reg_printed[8];
#undef TARGET_CAN_FOLLOW_JUMP
#define TARGET_CAN_FOLLOW_JUMP sparc_can_follow_jump
+#undef TARGET_ZERO_CALL_USED_REGS
+#define TARGET_ZERO_CALL_USED_REGS sparc_zero_call_used_regs
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return the memory reference contained in X if any, zero otherwise. */
@@ -3949,41 +3953,6 @@ emit_cbcond_nop (rtx_insn *insn)
return 1;
}
-/* Return nonzero if TRIAL can go into the call delay slot. */
-
-int
-eligible_for_call_delay (rtx_insn *trial)
-{
- rtx pat;
-
- if (get_attr_in_branch_delay (trial) == IN_BRANCH_DELAY_FALSE)
- return 0;
-
- /* The only problematic cases are TLS sequences with Sun as/ld. */
- if ((TARGET_GNU_TLS && HAVE_GNU_LD) || !TARGET_TLS)
- return 1;
-
- pat = PATTERN (trial);
-
- /* We must reject tgd_add{32|64}, i.e.
- (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSGD)))
- and tldm_add{32|64}, i.e.
- (set (reg) (plus (reg) (unspec [(reg) (symbol_ref)] UNSPEC_TLSLDM)))
- for Sun as/ld. */
- if (GET_CODE (pat) == SET
- && GET_CODE (SET_SRC (pat)) == PLUS)
- {
- rtx unspec = XEXP (SET_SRC (pat), 1);
-
- if (GET_CODE (unspec) == UNSPEC
- && (XINT (unspec, 1) == UNSPEC_TLSGD
- || XINT (unspec, 1) == UNSPEC_TLSLDM))
- return 0;
- }
-
- return 1;
-}
-
/* Return nonzero if TRIAL, an insn, can be combined with a 'restore'
instruction. RETURN_P is true if the v9 variant 'return' is to be
considered in the test too.
@@ -13845,4 +13814,50 @@ sparc_constant_alignment (const_tree exp, HOST_WIDE_INT align)
return align;
}
+/* Implement TARGET_ZERO_CALL_USED_REGS.
+
+ Generate a sequence of instructions that zero registers specified by
+ NEED_ZEROED_HARDREGS. Return the ZEROED_HARDREGS that are actually
+ zeroed. */
+
+static HARD_REG_SET
+sparc_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs)
+{
+ for (unsigned int regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+ if (TEST_HARD_REG_BIT (need_zeroed_hardregs, regno))
+ {
+ /* Do not touch the CC registers or the FP registers if no VIS. */
+ if (regno >= SPARC_FCC_REG
+ || (regno >= SPARC_FIRST_FP_REG && !TARGET_VIS))
+ CLEAR_HARD_REG_BIT (need_zeroed_hardregs, regno);
+
+ /* Do not access the odd upper FP registers individually. */
+ else if (regno >= SPARC_FIRST_V9_FP_REG && (regno & 1))
+ ;
+
+ /* Use the most natural mode for the registers, which is not given by
+ regno_reg_rtx/reg_raw_mode for the FP registers on the SPARC. */
+ else
+ {
+ machine_mode mode;
+ rtx reg;
+
+ if (regno < SPARC_FIRST_FP_REG)
+ {
+ reg = regno_reg_rtx[regno];
+ mode = GET_MODE (reg);
+ }
+ else
+ {
+ mode = regno < SPARC_FIRST_V9_FP_REG ? SFmode : DFmode;
+ reg = gen_raw_REG (mode, regno);
+ }
+
+ emit_move_insn (reg, CONST0_RTX (mode));
+ }
+ }
+
+ return need_zeroed_hardregs;
+}
+
#include "gt-sparc.h"
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 231c0d8..6e9ccb4 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -561,9 +561,9 @@
(set_attr "type" "multi")])
;; Attributes for branch scheduling
-(define_attr "in_call_delay" "false,true"
- (symbol_ref "(eligible_for_call_delay (insn)
- ? IN_CALL_DELAY_TRUE : IN_CALL_DELAY_FALSE)"))
+(define_attr "tls_delay_slot" "false,true"
+ (symbol_ref "((TARGET_GNU_TLS && HAVE_GNU_LD) != 0
+ ? TLS_DELAY_SLOT_TRUE : TLS_DELAY_SLOT_FALSE)"))
(define_attr "in_sibcall_delay" "false,true"
(symbol_ref "(eligible_for_sibcall_delay (insn)
@@ -613,27 +613,24 @@
(const_string "true")
] (const_string "false")))
-(define_delay (eq_attr "type" "call")
- [(eq_attr "in_call_delay" "true") (nil) (nil)])
-
(define_delay (eq_attr "type" "sibcall")
[(eq_attr "in_sibcall_delay" "true") (nil) (nil)])
(define_delay (eq_attr "type" "return")
[(eq_attr "in_return_delay" "true") (nil) (nil)])
-(define_delay (and (eq_attr "type" "branch")
- (not (eq_attr "branch_type" "icc")))
- [(eq_attr "in_branch_delay" "true") (nil) (eq_attr "in_branch_delay" "true")])
-
-(define_delay (and (eq_attr "type" "branch")
- (eq_attr "branch_type" "icc"))
- [(eq_attr "in_branch_delay" "true") (nil)
- (eq_attr "in_integer_branch_annul_delay" "true")])
-
-(define_delay (eq_attr "type" "uncond_branch")
+(define_delay (ior (eq_attr "type" "call") (eq_attr "type" "uncond_branch"))
[(eq_attr "in_branch_delay" "true") (nil) (nil)])
+(define_delay (and (eq_attr "type" "branch") (not (eq_attr "branch_type" "icc")))
+ [(eq_attr "in_branch_delay" "true")
+ (nil)
+ (eq_attr "in_branch_delay" "true")])
+
+(define_delay (and (eq_attr "type" "branch") (eq_attr "branch_type" "icc"))
+ [(eq_attr "in_branch_delay" "true")
+ (nil)
+ (eq_attr "in_integer_branch_annul_delay" "true")])
;; Include SPARC DFA schedulers
@@ -3771,10 +3768,13 @@ visl")
}
})
+;; Turning an add/sub instruction into the other changes the Carry flag
+;; so the 4096 trick cannot be used for operations in CCXCmode.
+
(define_expand "uaddvdi4"
[(parallel [(set (reg:CCXC CC_REG)
(compare:CCXC (plus:DI (match_operand:DI 1 "register_operand")
- (match_operand:DI 2 "arith_add_operand"))
+ (match_operand:DI 2 "arith_double_operand"))
(match_dup 1)))
(set (match_operand:DI 0 "register_operand")
(plus:DI (match_dup 1) (match_dup 2)))])
@@ -3793,10 +3793,13 @@ visl")
}
})
+;; Turning an add/sub instruction into the other does not change the Overflow
+;; flag so the 4096 trick can be used for operations in CCXVmode.
+
(define_expand "addvdi4"
[(parallel [(set (reg:CCXV CC_REG)
(compare:CCXV (plus:DI (match_operand:DI 1 "register_operand")
- (match_operand:DI 2 "arith_add_operand"))
+ (match_operand:DI 2 "arith_double_add_operand"))
(unspec:DI [(match_dup 1) (match_dup 2)]
UNSPEC_ADDV)))
(set (match_operand:DI 0 "register_operand")
@@ -3969,9 +3972,10 @@ visl")
""
"@
add\t%1, %2, %0
- sub\t%1, -%2, %0"
- [(set_attr "type" "*,*")
- (set_attr "fptype" "*,*")])
+ sub\t%1, -%2, %0")
+
+;; Turning an add/sub instruction into the other changes the Carry flag
+;; so the 4096 trick cannot be used for operations in CCCmode.
(define_expand "uaddvsi4"
[(parallel [(set (reg:CCC CC_REG)
@@ -3985,10 +3989,13 @@ visl")
(pc)))]
"")
+;; Turning an add/sub instruction into the other does not change the Overflow
+;; flag so the 4096 trick can be used for operations in CCVmode.
+
(define_expand "addvsi4"
[(parallel [(set (reg:CCV CC_REG)
(compare:CCV (plus:SI (match_operand:SI 1 "register_operand")
- (match_operand:SI 2 "arith_operand"))
+ (match_operand:SI 2 "arith_add_operand"))
(unspec:SI [(match_dup 1) (match_dup 2)]
UNSPEC_ADDV)))
(set (match_operand:SI 0 "register_operand")
@@ -4097,42 +4104,50 @@ visl")
(define_insn "*cmp_ccv_plus"
[(set (reg:CCV CC_REG)
- (compare:CCV (plus:SI (match_operand:SI 0 "register_operand" "%r")
- (match_operand:SI 1 "arith_operand" "rI"))
+ (compare:CCV (plus:SI (match_operand:SI 0 "register_operand" "%r,r")
+ (match_operand:SI 1 "arith_add_operand" "rI,O"))
(unspec:SI [(match_dup 0) (match_dup 1)] UNSPEC_ADDV)))]
""
- "addcc\t%0, %1, %%g0"
+ "@
+ addcc\t%0, %1, %%g0
+ subcc\t%0, -%1, %%g0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccxv_plus"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (plus:DI (match_operand:DI 0 "register_operand" "%r")
- (match_operand:DI 1 "arith_operand" "rI"))
+ (compare:CCXV (plus:DI (match_operand:DI 0 "register_operand" "%r,r")
+ (match_operand:DI 1 "arith_add_operand" "rI,O"))
(unspec:DI [(match_dup 0) (match_dup 1)] UNSPEC_ADDV)))]
"TARGET_ARCH64"
- "addcc\t%0, %1, %%g0"
+ "@
+ addcc\t%0, %1, %%g0
+ subcc\t%0, -%1, %%g0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccv_plus_set"
[(set (reg:CCV CC_REG)
- (compare:CCV (plus:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "arith_operand" "rI"))
+ (compare:CCV (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
+ (match_operand:SI 2 "arith_add_operand" "rI,O"))
(unspec:SI [(match_dup 1) (match_dup 2)] UNSPEC_ADDV)))
- (set (match_operand:SI 0 "register_operand" "=r")
+ (set (match_operand:SI 0 "register_operand" "=r,r")
(plus:SI (match_dup 1) (match_dup 2)))]
""
- "addcc\t%1, %2, %0"
+ "@
+ addcc\t%1, %2, %0
+ subcc\t%1, -%2, %0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccxv_plus_set"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (plus:DI (match_operand:DI 1 "register_operand" "%r")
- (match_operand:DI 2 "arith_operand" "rI"))
+ (compare:CCXV (plus:DI (match_operand:DI 1 "register_operand" "%r,r")
+ (match_operand:DI 2 "arith_add_operand" "rI,O"))
(unspec:DI [(match_dup 1) (match_dup 2)] UNSPEC_ADDV)))
- (set (match_operand:DI 0 "register_operand" "=r")
+ (set (match_operand:DI 0 "register_operand" "=r,r")
(plus:DI (match_dup 1) (match_dup 2)))]
"TARGET_ARCH64"
- "addcc\t%1, %2, %0"
+ "@
+ addcc\t%1, %2, %0
+ subcc\t%1, -%2, %0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccv_plus_sltu_set"
@@ -4164,10 +4179,13 @@ visl")
}
})
+;; Turning an add/sub instruction into the other changes the Carry flag
+;; so the 4096 trick cannot be used for operations in CCXmode.
+
(define_expand "usubvdi4"
[(parallel [(set (reg:CCX CC_REG)
(compare:CCX (match_operand:DI 1 "register_or_zero_operand")
- (match_operand:DI 2 "arith_add_operand")))
+ (match_operand:DI 2 "arith_double_operand")))
(set (match_operand:DI 0 "register_operand")
(minus:DI (match_dup 1) (match_dup 2)))])
(set (pc) (if_then_else (ltu (reg:CCX CC_REG) (const_int 0))
@@ -4191,10 +4209,13 @@ visl")
}
})
+;; Turning an add/sub instruction into the other does not change the Overflow
+;; flag so the 4096 trick can be used for operations in CCXVmode.
+
(define_expand "subvdi4"
[(parallel [(set (reg:CCXV CC_REG)
(compare:CCXV (minus:DI (match_operand:DI 1 "register_operand")
- (match_operand:DI 2 "arith_add_operand"))
+ (match_operand:DI 2 "arith_double_add_operand"))
(unspec:DI [(match_dup 1) (match_dup 2)]
UNSPEC_SUBV)))
(set (match_operand:DI 0 "register_operand")
@@ -4365,9 +4386,10 @@ visl")
""
"@
sub\t%1, %2, %0
- add\t%1, -%2, %0"
- [(set_attr "type" "*,*")
- (set_attr "fptype" "*,*")])
+ add\t%1, -%2, %0")
+
+;; Turning an add/sub instruction into the other changes the Carry flag
+;; so the 4096 trick cannot be used for operations in CCmode.
(define_expand "usubvsi4"
[(parallel [(set (reg:CC CC_REG)
@@ -4387,10 +4409,13 @@ visl")
}
})
+;; Turning an add/sub instruction into the other does not change the Overflow
+;; flag so the 4096 trick can be used for operations in CCVmode.
+
(define_expand "subvsi4"
[(parallel [(set (reg:CCV CC_REG)
(compare:CCV (minus:SI (match_operand:SI 1 "register_operand")
- (match_operand:SI 2 "arith_operand"))
+ (match_operand:SI 2 "arith_add_operand"))
(unspec:SI [(match_dup 1) (match_dup 2)]
UNSPEC_SUBV)))
(set (match_operand:SI 0 "register_operand")
@@ -4483,42 +4508,50 @@ visl")
(define_insn "*cmp_ccv_minus"
[(set (reg:CCV CC_REG)
- (compare:CCV (minus:SI (match_operand:SI 0 "register_or_zero_operand" "rJ")
- (match_operand:SI 1 "arith_operand" "rI"))
+ (compare:CCV (minus:SI (match_operand:SI 0 "register_or_zero_operand" "rJ,rJ")
+ (match_operand:SI 1 "arith_add_operand" "rI,O"))
(unspec:SI [(match_dup 0) (match_dup 1)] UNSPEC_SUBV)))]
""
- "subcc\t%r0, %1, %%g0"
+ "@
+ subcc\t%r0, %1, %%g0
+ addcc\t%r0, -%1, %%g0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccxv_minus"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (minus:DI (match_operand:DI 0 "register_or_zero_operand" "rJ")
- (match_operand:DI 1 "arith_operand" "rI"))
+ (compare:CCXV (minus:DI (match_operand:DI 0 "register_or_zero_operand" "rJ,rJ")
+ (match_operand:DI 1 "arith_add_operand" "rI,O"))
(unspec:DI [(match_dup 0) (match_dup 1)] UNSPEC_SUBV)))]
"TARGET_ARCH64"
- "subcc\t%r0, %1, %%g0"
+ "@
+ subcc\t%r0, %1, %%g0
+ addcc\t%r0, -%1, %%g0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccv_minus_set"
[(set (reg:CCV CC_REG)
- (compare:CCV (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ")
- (match_operand:SI 2 "arith_operand" "rI"))
+ (compare:CCV (minus:SI (match_operand:SI 1 "register_or_zero_operand" "rJ,rJ")
+ (match_operand:SI 2 "arith_add_operand" "rI,O"))
(unspec:SI [(match_dup 1) (match_dup 2)] UNSPEC_SUBV)))
- (set (match_operand:SI 0 "register_operand" "=r")
+ (set (match_operand:SI 0 "register_operand" "=r,r")
(minus:SI (match_dup 1) (match_dup 2)))]
""
- "subcc\t%r1, %2, %0"
+ "@
+ subcc\t%r1, %2, %0
+ addcc\t%r1, -%2, %0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccxv_minus_set"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (minus:DI (match_operand:DI 1 "register_or_zero_operand" "rJ")
- (match_operand:DI 2 "arith_operand" "rI"))
+ (compare:CCXV (minus:DI (match_operand:DI 1 "register_or_zero_operand" "rJ,rJ")
+ (match_operand:DI 2 "arith_add_operand" "rI,O"))
(unspec:DI [(match_dup 1) (match_dup 2)] UNSPEC_SUBV)))
- (set (match_operand:DI 0 "register_operand" "=r")
+ (set (match_operand:DI 0 "register_operand" "=r,r")
(minus:DI (match_dup 1) (match_dup 2)))]
"TARGET_ARCH64"
- "subcc\t%r1, %2, %0"
+ "@
+ subcc\t%r1, %2, %0
+ addcc\t%r1, -%2, %0"
[(set_attr "type" "compare")])
(define_insn "*cmp_ccv_minus_sltu_set"
@@ -5769,13 +5802,13 @@ visl")
(define_insn "negsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
- (neg:SI (match_operand:SI 1 "arith_operand" "rI")))]
+ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
""
"sub\t%%g0, %1, %0")
(define_expand "unegvsi3"
[(parallel [(set (reg:CCC CC_REG)
- (compare:CCC (not:SI (match_operand:SI 1 "arith_operand" ""))
+ (compare:CCC (not:SI (match_operand:SI 1 "register_operand" ""))
(const_int -1)))
(set (match_operand:SI 0 "register_operand" "")
(neg:SI (match_dup 1)))])
@@ -5787,7 +5820,7 @@ visl")
(define_expand "negvsi3"
[(parallel [(set (reg:CCV CC_REG)
- (compare:CCV (neg:SI (match_operand:SI 1 "arith_operand" ""))
+ (compare:CCV (neg:SI (match_operand:SI 1 "register_operand" ""))
(unspec:SI [(match_dup 1)] UNSPEC_NEGV)))
(set (match_operand:SI 0 "register_operand" "")
(neg:SI (match_dup 1)))])
@@ -5799,7 +5832,7 @@ visl")
(define_insn "*cmp_ccnz_neg"
[(set (reg:CCNZ CC_REG)
- (compare:CCNZ (neg:SI (match_operand:SI 0 "arith_operand" "rI"))
+ (compare:CCNZ (neg:SI (match_operand:SI 0 "register_operand" "r"))
(const_int 0)))]
""
"subcc\t%%g0, %0, %%g0"
@@ -5807,7 +5840,7 @@ visl")
(define_insn "*cmp_ccxnz_neg"
[(set (reg:CCXNZ CC_REG)
- (compare:CCXNZ (neg:DI (match_operand:DI 0 "arith_operand" "rI"))
+ (compare:CCXNZ (neg:DI (match_operand:DI 0 "register_operand" "r"))
(const_int 0)))]
"TARGET_ARCH64"
"subcc\t%%g0, %0, %%g0"
@@ -5815,7 +5848,7 @@ visl")
(define_insn "*cmp_ccnz_neg_set"
[(set (reg:CCNZ CC_REG)
- (compare:CCNZ (neg:SI (match_operand:SI 1 "arith_operand" "rI"))
+ (compare:CCNZ (neg:SI (match_operand:SI 1 "register_operand" "r"))
(const_int 0)))
(set (match_operand:SI 0 "register_operand" "=r")
(neg:SI (match_dup 1)))]
@@ -5825,7 +5858,7 @@ visl")
(define_insn "*cmp_ccxnz_neg_set"
[(set (reg:CCXNZ CC_REG)
- (compare:CCXNZ (neg:DI (match_operand:DI 1 "arith_operand" "rI"))
+ (compare:CCXNZ (neg:DI (match_operand:DI 1 "register_operand" "r"))
(const_int 0)))
(set (match_operand:DI 0 "register_operand" "=r")
(neg:DI (match_dup 1)))]
@@ -5835,7 +5868,7 @@ visl")
(define_insn "*cmp_ccc_neg_set"
[(set (reg:CCC CC_REG)
- (compare:CCC (not:SI (match_operand:SI 1 "arith_operand" "rI"))
+ (compare:CCC (not:SI (match_operand:SI 1 "register_operand" "r"))
(const_int -1)))
(set (match_operand:SI 0 "register_operand" "=r")
(neg:SI (match_dup 1)))]
@@ -5845,7 +5878,7 @@ visl")
(define_insn "*cmp_ccxc_neg_set"
[(set (reg:CCXC CC_REG)
- (compare:CCXC (not:DI (match_operand:DI 1 "arith_operand" "rI"))
+ (compare:CCXC (not:DI (match_operand:DI 1 "register_operand" "r"))
(const_int -1)))
(set (match_operand:DI 0 "register_operand" "=r")
(neg:DI (match_dup 1)))]
@@ -5856,7 +5889,7 @@ visl")
(define_insn "*cmp_ccc_neg_sltu_set"
[(set (reg:CCC CC_REG)
(compare:CCC (zero_extend:DI
- (neg:SI (plus:SI (match_operand:SI 1 "arith_operand" "rI")
+ (neg:SI (plus:SI (match_operand:SI 1 "register_operand" "r")
(ltu:SI (reg:CCC CC_REG)
(const_int 0)))))
(neg:DI (plus:DI (zero_extend:DI (match_dup 1))
@@ -5871,7 +5904,7 @@ visl")
(define_insn "*cmp_ccv_neg"
[(set (reg:CCV CC_REG)
- (compare:CCV (neg:SI (match_operand:SI 0 "arith_operand" "rI"))
+ (compare:CCV (neg:SI (match_operand:SI 0 "register_operand" "r"))
(unspec:SI [(match_dup 0)] UNSPEC_NEGV)))]
""
"subcc\t%%g0, %0, %%g0"
@@ -5879,7 +5912,7 @@ visl")
(define_insn "*cmp_ccxv_neg"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (neg:DI (match_operand:DI 0 "arith_operand" "rI"))
+ (compare:CCXV (neg:DI (match_operand:DI 0 "register_operand" "r"))
(unspec:DI [(match_dup 0)] UNSPEC_NEGV)))]
"TARGET_ARCH64"
"subcc\t%%g0, %0, %%g0"
@@ -5887,7 +5920,7 @@ visl")
(define_insn "*cmp_ccv_neg_set"
[(set (reg:CCV CC_REG)
- (compare:CCV (neg:SI (match_operand:SI 1 "arith_operand" "rI"))
+ (compare:CCV (neg:SI (match_operand:SI 1 "register_operand" "r"))
(unspec:SI [(match_dup 1)] UNSPEC_NEGV)))
(set (match_operand:SI 0 "register_operand" "=r")
(neg:SI (match_dup 1)))]
@@ -5897,7 +5930,7 @@ visl")
(define_insn "*cmp_ccxv_neg_set"
[(set (reg:CCXV CC_REG)
- (compare:CCXV (neg:DI (match_operand:DI 1 "arith_operand" "rI"))
+ (compare:CCXV (neg:DI (match_operand:DI 1 "register_operand" "r"))
(unspec:DI [(match_dup 1)] UNSPEC_NEGV)))
(set (match_operand:DI 0 "register_operand" "=r")
(neg:DI (match_dup 1)))]
@@ -5907,7 +5940,7 @@ visl")
(define_insn "*cmp_ccv_neg_sltu_set"
[(set (reg:CCV CC_REG)
- (compare:CCV (neg:SI (plus:SI (match_operand:SI 1 "arith_operand" "rI")
+ (compare:CCV (neg:SI (plus:SI (match_operand:SI 1 "register_operand" "r")
(ltu:SI (reg:CCC CC_REG) (const_int 0))))
(unspec:SI [(plus:SI (match_dup 1)
(ltu:SI (reg:CCC CC_REG)
@@ -7935,7 +7968,9 @@ visl")
(clobber (reg:P O7_REG))]
"TARGET_TLS"
"call\t%a1, %%tgd_call(%a2)%#"
- [(set_attr "type" "call")])
+ [(set (attr "type") (if_then_else (eq_attr "tls_delay_slot" "true")
+ (const_string "call")
+ (const_string "call_no_delay_slot")))])
(define_insn "tldm_hi22<P:mode>"
[(set (match_operand:P 0 "register_operand" "=r")
@@ -7966,7 +8001,9 @@ visl")
(clobber (reg:P O7_REG))]
"TARGET_TLS"
"call\t%a1, %%tldm_call(%&)%#"
- [(set_attr "type" "call")])
+ [(set (attr "type") (if_then_else (eq_attr "tls_delay_slot" "true")
+ (const_string "call")
+ (const_string "call_no_delay_slot")))])
(define_insn "tldo_hix22<P:mode>"
[(set (match_operand:P 0 "register_operand" "=r")