(define_constants
[(UNSPECV_BLOCKAGE 0)
])
+
+;; Registers by name.
+(define_constants
+ [(A0_REG 8)
+ (SP_REG 15)
+ ])
\f
(define_insn ""
[(set (match_operand:DF 0 "push_operand" "=m")
[(set (cc0)
(match_operand:SF 0 "general_operand" ""))]
"TARGET_68881"
- "
{
m68k_last_compare_had_fp_operands = 1;
-}")
+})
(define_insn ""
[(set (cc0)
[(set (cc0)
(match_operand:DF 0 "general_operand" ""))]
"TARGET_68881"
- "
{
m68k_last_compare_had_fp_operands = 1;
-}")
+})
(define_insn ""
[(set (cc0)
(compare (match_operand:SI 0 "nonimmediate_operand" "")
(match_operand:SI 1 "general_operand" "")))]
""
- "
{
m68k_last_compare_had_fp_operands = 0;
if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
operands[1] = legitimize_pic_address (operands[1], SImode, temp);
}
-}")
+})
;; A composite of the cmp, cmpa, cmpi & cmpm m68000 op codes.
(define_insn ""
(compare (match_operand:DF 0 "general_operand" "")
(match_operand:DF 1 "general_operand" "")))]
"TARGET_68881"
- "
{
m68k_last_compare_had_fp_operands = 1;
-}")
+})
(define_insn ""
[(set (cc0)
(compare (match_operand:SF 0 "general_operand" "")
(match_operand:SF 1 "general_operand" "")))]
"TARGET_68881"
- "
{
m68k_last_compare_had_fp_operands = 1;
-}")
+})
(define_insn ""
[(set (cc0)
[(set (match_operand:SI 0 "nonimmediate_operand" "")
(match_operand:SI 1 "general_operand" ""))]
""
- "
{
if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
{
operands[0] = gen_rtx_MEM (SImode,
force_reg (SImode, XEXP (operands[0], 0)));
}
-}")
+})
;; General case of fullword move. The register constraints
;; force integer constants in range for a moveq to be reloaded
"* return output_move_strictqi (operands);")
(define_expand "pushqi1"
- [(set (reg:SI 15) (plus:SI (reg:SI 15) (const_int -2)))
- (set (mem:QI (plus:SI (reg:SI 15) (const_int 1)))
+ [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -2)))
+ (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int 1)))
(match_operand:QI 0 "general_operand" ""))]
"!TARGET_COLDFIRE"
"")
[(set (match_operand:XF 0 "nonimmediate_operand" "")
(match_operand:XF 1 "general_operand" ""))]
""
- "
{
/* We can't rewrite operands during reload. */
if (! reload_in_progress)
force_reg (SImode, XEXP (operands[0], 0)));
}
}
-}")
+})
(define_insn ""
[(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,f,!r,!f,!r")
"")
(define_insn "*cfv4_extendqisi2"
- [(set (match_operand:SI 0 "general_operand" "=d")
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=d")
(sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "rms")))]
"TARGET_CFV4"
"mvs%.b %1,%0")
(const_int 32))))
(clobber (match_dup 3))])]
"TARGET_68020 && !TARGET_68060 && !TARGET_COLDFIRE"
- "
{
operands[3] = gen_reg_rtx (SImode);
operands[1], operands[2]));
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
(const_int 32))))
(clobber (match_dup 3))])]
"TARGET_68020 && !TARGET_68060 && !TARGET_COLDFIRE"
- "
{
operands[3] = gen_reg_rtx (SImode);
if (GET_CODE (operands[2]) == CONST_INT)
operands[1], operands[2]));
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
&& GET_CODE (operands[2]) == CONST_INT)
{
if (INTVAL (operands[2]) == 0x000000ff)
- return \"mvz%.b %0,%0\";
+ return "mvz%.b %0,%0";
else if (INTVAL (operands[2]) == 0x0000ffff)
- return \"mvz%.w %0,%0\";
+ return "mvz%.w %0,%0";
}
return output_andsi3 (operands);
})
[(set (match_operand:DI 0 "nonimmediate_operand" "")
(neg:DI (match_operand:DI 1 "general_operand" "")))]
""
- "
{
if (TARGET_COLDFIRE)
emit_insn (gen_negdi2_5200 (operands[0], operands[1]));
else
emit_insn (gen_negdi2_internal (operands[0], operands[1]));
DONE;
-}")
+})
(define_insn "negdi2_internal"
[(set (match_operand:DI 0 "nonimmediate_operand" "=<,do,!*a")
[(set (match_operand:SI 0 "nonimmediate_operand" "")
(neg:SI (match_operand:SI 1 "general_operand" "")))]
""
- "
{
if (TARGET_COLDFIRE)
emit_insn (gen_negsi2_5200 (operands[0], operands[1]));
else
emit_insn (gen_negsi2_internal (operands[0], operands[1]));
DONE;
-}")
+})
(define_insn "negsi2_internal"
[(set (match_operand:SI 0 "nonimmediate_operand" "=dm")
[(set (match_operand:SF 0 "nonimmediate_operand" "")
(neg:SF (match_operand:SF 1 "general_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_move_insn (operands[0], operands[0]);
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:SF 0 "nonimmediate_operand" "=f,d")
[(set (match_operand:DF 0 "nonimmediate_operand" "")
(neg:DF (match_operand:DF 1 "general_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_no_conflict_block (insns, operands[0], operands[1], 0, 0);
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:DF 0 "nonimmediate_operand" "=f,d")
[(set (match_operand:SF 0 "nonimmediate_operand" "")
(abs:SF (match_operand:SF 1 "general_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_move_insn (operands[0], operands[0]);
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:SF 0 "nonimmediate_operand" "=f")
[(set (match_operand:DF 0 "nonimmediate_operand" "")
(abs:DF (match_operand:DF 1 "general_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_no_conflict_block (insns, operands[0], operands[1], 0, 0);
DONE;
}
-}")
+})
(define_insn ""
[(set (match_operand:DF 0 "nonimmediate_operand" "=f")
[(set (match_operand:SI 0 "nonimmediate_operand" "")
(not:SI (match_operand:SI 1 "general_operand" "")))]
""
- "
{
if (TARGET_COLDFIRE)
emit_insn (gen_one_cmplsi2_5200 (operands[0], operands[1]));
else
emit_insn (gen_one_cmplsi2_internal (operands[0], operands[1]));
DONE;
-}")
+})
(define_insn "one_cmplsi2_internal"
[(set (match_operand:SI 0 "nonimmediate_operand" "=dm")
[(set (match_operand:QI 0 "register_operand" "")
(eq:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(set (match_operand:QI 0 "register_operand" "")
(ne:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(set (match_operand:QI 0 "register_operand" "")
(gt:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(set (match_operand:QI 0 "register_operand" "")
(lt:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(set (match_operand:QI 0 "register_operand" "")
(ge:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(set (match_operand:QI 0 "register_operand" "")
(le:QI (cc0) (const_int 0)))]
""
- "
{
if (TARGET_68060 && m68k_last_compare_had_fp_operands)
{
m68k_last_compare_had_fp_operands = 0;
FAIL;
}
-}")
+})
(define_insn ""
[(set (match_operand:QI 0 "register_operand" "=d")
[(parallel [(set (pc) (match_operand 0 "" ""))
(use (label_ref (match_operand 1 "" "")))])]
""
- "
{
#ifdef CASE_VECTOR_PC_RELATIVE
operands[0] = gen_rtx_PLUS (SImode, pc_rtx,
gen_rtx_SIGN_EXTEND (SImode, operands[0]));
#endif
-}")
+})
;; Jump to variable address from dispatch table of absolute addresses.
(define_insn ""
;; Operand 1 not really used on the m68000.
""
- "
{
if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
-}")
+})
;; This is a normal call sequence.
(define_insn ""
(match_operand:SI 2 "general_operand" "")))]
;; Operand 2 not really used on the m68000.
""
- "
{
if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
-}")
+})
;; This is a normal call_value
(define_insn ""
(match_operand 1 "" "")
(match_operand 2 "" "")])]
"NEEDS_UNTYPED_CALL"
- "
{
int i;
emit_insn (gen_blockage ());
DONE;
-}")
+})
;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
;; all of memory. This blocks insns from being moved across this point.
;; But it is mainly intended to test the support for these optimizations.
(define_peephole
- [(set (reg:SI 15) (plus:SI (reg:SI 15) (const_int 4)))
+ [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int 4)))
(set (match_operand:DF 0 "register_operand" "=f")
(match_operand:DF 1 "register_operand" "ad"))]
"FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])"
;; when there are consecutive library calls.
(define_peephole
- [(set (reg:SI 15) (plus:SI (reg:SI 15)
- (match_operand:SI 0 "const_int_operand" "n")))
+ [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
+ (match_operand:SI 0 "const_int_operand" "n")))
(set (match_operand:SF 1 "push_operand" "=m")
(match_operand:SF 2 "general_operand" "rmfF"))]
"INTVAL (operands[0]) >= 4
;; Speed up stack adjust followed by a fullword fixedpoint push.
(define_peephole
- [(set (reg:SI 15) (plus:SI (reg:SI 15)
- (match_operand:SI 0 "const_int_operand" "n")))
+ [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
+ (match_operand:SI 0 "const_int_operand" "n")))
(set (match_operand:SI 1 "push_operand" "=m")
(match_operand:SI 2 "general_operand" "g"))]
"INTVAL (operands[0]) >= 4
;; Speed up pushing a single byte but leaving four bytes of space.
(define_peephole
- [(set (mem:QI (pre_dec:SI (reg:SI 15)))
+ [(set (mem:QI (pre_dec:SI (reg:SI SP_REG)))
(match_operand:QI 1 "general_operand" "dami"))
- (set (reg:SI 15) (minus:SI (reg:SI 15) (const_int 2)))]
+ (set (reg:SI SP_REG) (minus:SI (reg:SI SP_REG) (const_int 2)))]
"! reg_mentioned_p (stack_pointer_rtx, operands[1])"
{
rtx xoperands[4];
[(set (match_operand:XF 0 "nonimmediate_operand" "")
(neg:XF (match_operand:XF 1 "nonimmediate_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_no_conflict_block (insns, operands[0], operands[1], 0, 0);
DONE;
}
-}")
+})
(define_insn "negxf2_68881"
[(set (match_operand:XF 0 "nonimmediate_operand" "=f")
[(set (match_operand:XF 0 "nonimmediate_operand" "")
(abs:XF (match_operand:XF 1 "nonimmediate_operand" "")))]
""
- "
{
if (!TARGET_68881)
{
emit_no_conflict_block (insns, operands[0], operands[1], 0, 0);
DONE;
}
-}")
+})
(define_insn "absxf2_68881"
[(set (match_operand:XF 0 "nonimmediate_operand" "=f")