⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sparc.md

📁 这是leon3处理器的交叉编译链
💻 MD
📖 第 1 页 / 共 5 页
字号:
  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1)                                              (const_int 0))                                       (const_int 1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*neg_snedi_zero"  [(set (match_operand:DI 0 "register_operand" "=&r")        (neg:DI (ne:DI (match_operand:DI 1 "register_operand" "r")                       (const_int 0))))]  "TARGET_ARCH64"  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:DI (ne:DI (match_dup 1)                                              (const_int 0))                                       (const_int -1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*snedi_zero_trunc"  [(set (match_operand:SI 0 "register_operand" "=&r")        (ne:SI (match_operand:DI 1 "register_operand" "r")               (const_int 0)))]  "TARGET_ARCH64"  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:SI (ne:DI (match_dup 1)                                              (const_int 0))                                       (const_int 1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*seqsi_zero"  [(set (match_operand:SI 0 "register_operand" "=r")	(eq:SI (match_operand:SI 1 "register_operand" "r")	       (const_int 0)))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (geu:SI (reg:CC 100) (const_int 0)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*neg_seqsi_zero"  [(set (match_operand:SI 0 "register_operand" "=r")	(neg:SI (eq:SI (match_operand:SI 1 "register_operand" "r")		       (const_int 0))))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (neg:SI (geu:SI (reg:CC 100) (const_int 0))))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*seqsi_zero_extend"  [(set (match_operand:DI 0 "register_operand" "=r")        (eq:DI (match_operand:SI 1 "register_operand" "r")               (const_int 0)))   (clobber (reg:CC 100))]  "TARGET_ARCH64"  "#"  "&& 1"  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (minus:SI (const_int 0)                                                     (match_dup 1))                                           (const_int 0)))   (set (match_dup 0) (zero_extend:DI (minus:SI (minus:SI (const_int 0)                                                          (const_int -1))                                                (ltu:SI (reg:CC_NOOV 100)                                                        (const_int 0)))))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*seqdi_zero"  [(set (match_operand:DI 0 "register_operand" "=&r")        (eq:DI (match_operand:DI 1 "register_operand" "r")               (const_int 0)))]  "TARGET_ARCH64"  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1)                                              (const_int 0))                                       (const_int 1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*neg_seqdi_zero"  [(set (match_operand:DI 0 "register_operand" "=&r")        (neg:DI (eq:DI (match_operand:DI 1 "register_operand" "r")                       (const_int 0))))]  "TARGET_ARCH64"  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:DI (eq:DI (match_dup 1)                                              (const_int 0))                                       (const_int -1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")]) (define_insn_and_split "*seqdi_zero_trunc"  [(set (match_operand:SI 0 "register_operand" "=&r")        (eq:SI (match_operand:DI 1 "register_operand" "r")               (const_int 0)))]  "TARGET_ARCH64"  "#"  "&& ! reg_overlap_mentioned_p (operands[1], operands[0])"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0) (if_then_else:SI (eq:DI (match_dup 1)                                              (const_int 0))                                       (const_int 1)                                       (match_dup 0)))]  ""  [(set_attr "length" "2")]);; We can also do (x + (i == 0)) and related, so put them in.;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode;; versions for v9.(define_insn_and_split "*x_plus_i_ne_0"  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (ne:SI (match_operand:SI 1 "register_operand" "r")			(const_int 0))		 (match_operand:SI 2 "register_operand" "r")))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (plus:SI (ltu:SI (reg:CC 100) (const_int 0))			       (match_dup 2)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*x_minus_i_ne_0"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 2 "register_operand" "r")		  (ne:SI (match_operand:SI 1 "register_operand" "r")			 (const_int 0))))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (minus:SI (match_dup 2)				(ltu:SI (reg:CC 100) (const_int 0))))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*x_plus_i_eq_0"  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (eq:SI (match_operand:SI 1 "register_operand" "r")			(const_int 0))		 (match_operand:SI 2 "register_operand" "r")))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (plus:SI (geu:SI (reg:CC 100) (const_int 0))			       (match_dup 2)))]  ""  [(set_attr "length" "2")])(define_insn_and_split "*x_minus_i_eq_0"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 2 "register_operand" "r")		  (eq:SI (match_operand:SI 1 "register_operand" "r")			 (const_int 0))))   (clobber (reg:CC 100))]  ""  "#"  ""  [(set (reg:CC_NOOV 100) (compare:CC_NOOV (neg:SI (match_dup 1))					   (const_int 0)))   (set (match_dup 0) (minus:SI (match_dup 2)				(geu:SI (reg:CC 100) (const_int 0))))]  ""  [(set_attr "length" "2")]);; We can also do GEU and LTU directly, but these operate after a compare.;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode;; versions for v9.(define_insn "*sltu_insn"  [(set (match_operand:SI 0 "register_operand" "=r")	(ltu:SI (reg:CC 100) (const_int 0)))]  ""  "addx\t%%g0, 0, %0"  [(set_attr "type" "ialuX")])(define_insn "*neg_sltu_insn"  [(set (match_operand:SI 0 "register_operand" "=r")	(neg:SI (ltu:SI (reg:CC 100) (const_int 0))))]  ""  "subx\t%%g0, 0, %0"  [(set_attr "type" "ialuX")]);; ??? Combine should canonicalize these next two to the same pattern.(define_insn "*neg_sltu_minus_x"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (neg:SI (ltu:SI (reg:CC 100) (const_int 0)))		  (match_operand:SI 1 "arith_operand" "rI")))]  ""  "subx\t%%g0, %1, %0"  [(set_attr "type" "ialuX")])(define_insn "*neg_sltu_plus_x"  [(set (match_operand:SI 0 "register_operand" "=r")	(neg:SI (plus:SI (ltu:SI (reg:CC 100) (const_int 0))			 (match_operand:SI 1 "arith_operand" "rI"))))]  ""  "subx\t%%g0, %1, %0"  [(set_attr "type" "ialuX")])(define_insn "*sgeu_insn"  [(set (match_operand:SI 0 "register_operand" "=r")	(geu:SI (reg:CC 100) (const_int 0)))]  ""  "subx\t%%g0, -1, %0"  [(set_attr "type" "ialuX")])(define_insn "*neg_sgeu_insn"  [(set (match_operand:SI 0 "register_operand" "=r")	(neg:SI (geu:SI (reg:CC 100) (const_int 0))))]  ""  "addx\t%%g0, -1, %0"  [(set_attr "type" "ialuX")]);; We can also do (x + ((unsigned) i >= 0)) and related, so put them in.;; ??? The addx/subx insns use the 32 bit carry flag so there are no DImode;; versions for v9.(define_insn "*sltu_plus_x"  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (ltu:SI (reg:CC 100) (const_int 0))		 (match_operand:SI 1 "arith_operand" "rI")))]  ""  "addx\t%%g0, %1, %0"  [(set_attr "type" "ialuX")])(define_insn "*sltu_plus_x_plus_y"  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (ltu:SI (reg:CC 100) (const_int 0))		 (plus:SI (match_operand:SI 1 "arith_operand" "%r")			  (match_operand:SI 2 "arith_operand" "rI"))))]  ""  "addx\t%1, %2, %0"  [(set_attr "type" "ialuX")])(define_insn "*x_minus_sltu"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "register_operand" "r")		  (ltu:SI (reg:CC 100) (const_int 0))))]  ""  "subx\t%1, 0, %0"  [(set_attr "type" "ialuX")]);; ??? Combine should canonicalize these next two to the same pattern.(define_insn "*x_minus_y_minus_sltu"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ")			    (match_operand:SI 2 "arith_operand" "rI"))		  (ltu:SI (reg:CC 100) (const_int 0))))]  ""  "subx\t%r1, %2, %0"  [(set_attr "type" "ialuX")])(define_insn "*x_minus_sltu_plus_y"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ")		  (plus:SI (ltu:SI (reg:CC 100) (const_int 0))			   (match_operand:SI 2 "arith_operand" "rI"))))]  ""  "subx\t%r1, %2, %0"  [(set_attr "type" "ialuX")])(define_insn "*sgeu_plus_x"  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (geu:SI (reg:CC 100) (const_int 0))		 (match_operand:SI 1 "register_operand" "r")))]  ""  "subx\t%1, -1, %0"  [(set_attr "type" "ialuX")])(define_insn "*x_minus_sgeu"  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "register_operand" "r")		  (geu:SI (reg:CC 100) (const_int 0))))]  ""  "addx\t%1, -1, %0"  [(set_attr "type" "ialuX")])(define_split  [(set (match_operand:SI 0 "register_operand" "")	(match_operator:SI 2 "noov_compare_op"			   [(match_operand 1 "icc_or_fcc_reg_operand" "")			    (const_int 0)]))]  ;; 32 bit LTU/GEU are better implemented using addx/subx  "TARGET_V9 && REGNO (operands[1]) == SPARC_ICC_REG   && (GET_MODE (operands[1]) == CCXmode       || (GET_CODE (operands[2]) != LTU && GET_CODE (operands[2]) != GEU))"  [(set (match_dup 0) (const_int 0))   (set (match_dup 0)	(if_then_else:SI (match_op_dup:SI 2 [(match_dup 1) (const_int 0)])			 (const_int 1)			 (match_dup 0)))]  "");; These control RTL generation for conditional jump insns;; The quad-word fp compare library routines all return nonzero to indicate;; true, which is different from the equivalent libgcc routines, so we must;; handle them specially here.(define_expand "beq"  [(set (pc)	(if_then_else (eq (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx      && GET_CODE (sparc_compare_op0) == REG      && GET_MODE (sparc_compare_op0) == DImode)    {      emit_v9_brxx_insn (EQ, sparc_compare_op0, operands[0]);      DONE;    }  else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, EQ);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1);})(define_expand "bne"  [(set (pc)	(if_then_else (ne (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx      && GET_CODE (sparc_compare_op0) == REG      && GET_MODE (sparc_compare_op0) == DImode)    {      emit_v9_brxx_insn (NE, sparc_compare_op0, operands[0]);      DONE;    }  else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, NE);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1);})(define_expand "bgt"  [(set (pc)	(if_then_else (gt (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx      && GET_CODE (sparc_compare_op0) == REG      && GET_MODE (sparc_compare_op0) == DImode)    {      emit_v9_brxx_insn (GT, sparc_compare_op0, operands[0]);      DONE;    }  else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, GT);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1);})(define_expand "bgtu"  [(set (pc)	(if_then_else (gtu (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  operands[1] = gen_compare_reg (GTU, sparc_compare_op0, sparc_compare_op1);})(define_expand "blt"  [(set (pc)	(if_then_else (lt (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (TARGET_ARCH64 && sparc_compare_op1 == const0_rtx      && GET_CODE (sparc_compare_op0) == REG      && GET_MODE (sparc_compare_op0) == DImode)    {      emit_v9_brxx_insn (LT, sparc_compare_op0, operands[0]);      DONE;    }  else if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LT);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1);})(define_expand "bltu"  [(set (pc)	(if_then_else (ltu (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -