;; Machine description for TI C6X.
-;; Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
;; Contributed by Andrew Jenner <andrew@codesourcery.com>
;; Contributed by Bernd Schmidt <bernds@codesourcery.com>
;; Contributed by CodeSourcery.
"%|%.\\tldw\\t%$\\t*+%1[%2], %0"
[(set_attr "type" "load")
(set_attr "units" "d_addr")
+ (set_attr "op_pattern" "unknown")
(set_attr "dest_regfile" "a,b")
(set_attr "addr_regfile" "b")])
[(set (match_dup 2) (match_dup 3))]
{
unsigned HOST_WIDE_INT mask, val;
- enum machine_mode inner_mode = GET_MODE_INNER (<MODE>mode);
+ machine_mode inner_mode = GET_MODE_INNER (<MODE>mode);
int i;
val = 0;
unsigned HOST_WIDE_INT mask;
unsigned HOST_WIDE_INT val[2];
rtx lo_half, hi_half;
- enum machine_mode inner_mode = GET_MODE_INNER (<MODE>mode);
+ machine_mode inner_mode = GET_MODE_INNER (<MODE>mode);
int i, j;
split_di (operands, 1, &lo_half, &hi_half);
(ashift:SI (match_dup 4) (const_int 16))))]
{
long values;
- REAL_VALUE_TYPE value;
gcc_assert (GET_CODE (operands[1]) == CONST_DOUBLE);
- REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]);
- REAL_VALUE_TO_TARGET_SINGLE (value, values);
+ REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), values);
operands[2] = gen_rtx_REG (SImode, true_regnum (operands[0]));
operands[3] = GEN_INT (trunc_int_for_mode (values, HImode));
UNSPEC_MISALIGNED_ACCESS))]
"TARGET_INSNS_64"
{
- if (memory_operand (operands[0], <MODE>mode))
+ if (MEM_P (operands[0]))
{
emit_insn (gen_movmisalign<mode>_store (operands[0], operands[1]));
DONE;
rtx tmpreg = gen_reg_rtx (SImode);
rtx t = gen_rtx_fmt_ee (reverse_condition (GET_CODE (operands[1])),
SImode, operands[2], operands[3]);
- emit_insn (gen_rtx_SET (VOIDmode, tmpreg, t));
+ emit_insn (gen_rtx_SET (tmpreg, t));
emit_insn (gen_scmpsi_insn (operands[0],
gen_rtx_fmt_ee (EQ, SImode, tmpreg, const0_rtx),
tmpreg, const0_rtx));
;; -------------------------------------------------------------------------
; operand 0 is the loop count pseudo register
-; operand 1 is the number of loop iterations or 0 if it is unknown
-; operand 2 is the maximum number of loop iterations
-; operand 3 is the number of levels of enclosed loops
-; operand 4 is the label to jump to at the top of the loop
+; operand 1 is the label to jump to at the top of the loop
(define_expand "doloop_end"
[(parallel [(set (pc) (if_then_else
(ne (match_operand:SI 0 "" "")
(const_int 1))
- (label_ref (match_operand 4 "" ""))
+ (label_ref (match_operand 1 "" ""))
(pc)))
(set (match_dup 0)
(plus:SI (match_dup 0)
(const_int -1)))
- (clobber (match_scratch:SI 5 ""))])]
+ (clobber (match_dup 2))])] ; match_scratch
"TARGET_INSNS_64PLUS && optimize"
{
/* The loop optimizer doesn't check the predicates... */
if (GET_MODE (operands[0]) != SImode)
FAIL;
+ operands[2] = gen_rtx_SCRATCH (SImode);
})
(define_insn "mvilc"
;; -------------------------------------------------------------------------
(define_insn "real_jump"
- [(unspec [(match_operand 0 "c6x_jump_operand" "a,b,s") (const_int 0)]
+ [(unspec [(match_operand 0 "c6x_jump_operand" "a,b,S3") (const_int 0)]
UNSPEC_REAL_JUMP)]
""
{
"TARGET_FP && flag_reciprocal_math"
{
operands[3] = force_reg (SFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (dconst2, SFmode));
+ const_double_from_real_value (dconst2, SFmode));
operands[4] = gen_reg_rtx (SFmode);
operands[5] = gen_reg_rtx (SFmode);
operands[6] = gen_reg_rtx (SFmode);
"TARGET_FP && flag_reciprocal_math"
{
operands[3] = force_reg (DFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (dconst2, DFmode));
+ const_double_from_real_value (dconst2, DFmode));
operands[4] = gen_reg_rtx (DFmode);
operands[5] = gen_reg_rtx (DFmode);
operands[6] = gen_reg_rtx (DFmode);
;; Block moves
;; -------------------------------------------------------------------------
-(define_expand "movmemsi"
+(define_expand "cpymemsi"
[(use (match_operand:BLK 0 "memory_operand" ""))
(use (match_operand:BLK 1 "memory_operand" ""))
(use (match_operand:SI 2 "nonmemory_operand" ""))
(use (match_operand:SI 5 "const_int_operand" ""))]
""
{
- if (c6x_expand_movmem (operands[0], operands[1], operands[2], operands[3],
+ if (c6x_expand_cpymem (operands[0], operands[1], operands[2], operands[3],
operands[4], operands[5]))
DONE;
else