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

📄 sparc.md

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
(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 "" ""))		      (pc)))]  ""{  operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1);})(define_expand "bge"  [(set (pc)	(if_then_else (ge (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 (GE, 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, GE);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1);})(define_expand "bgeu"  [(set (pc)	(if_then_else (geu (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1);})(define_expand "ble"  [(set (pc)	(if_then_else (le (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 (LE, 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, LE);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1);})(define_expand "bleu"  [(set (pc)	(if_then_else (leu (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  operands[1] = gen_compare_reg (LEU, sparc_compare_op0, sparc_compare_op1);})(define_expand "bunordered"  [(set (pc)	(if_then_else (unordered (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1,				UNORDERED);      emit_jump_insn (gen_beq (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNORDERED, sparc_compare_op0,				 sparc_compare_op1);})(define_expand "bordered"  [(set (pc)	(if_then_else (ordered (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, ORDERED);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (ORDERED, sparc_compare_op0,				 sparc_compare_op1);})(define_expand "bungt"  [(set (pc)	(if_then_else (ungt (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, UNGT);      emit_jump_insn (gen_bgt (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNGT, sparc_compare_op0, sparc_compare_op1);})(define_expand "bunlt"  [(set (pc)	(if_then_else (unlt (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, UNLT);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNLT, sparc_compare_op0, sparc_compare_op1);})(define_expand "buneq"  [(set (pc)	(if_then_else (uneq (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, UNEQ);      emit_jump_insn (gen_beq (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNEQ, sparc_compare_op0, sparc_compare_op1);})(define_expand "bunge"  [(set (pc)	(if_then_else (unge (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, UNGE);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNGE, sparc_compare_op0, sparc_compare_op1);})(define_expand "bunle"  [(set (pc)	(if_then_else (unle (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, UNLE);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (UNLE, sparc_compare_op0, sparc_compare_op1);})(define_expand "bltgt"  [(set (pc)	(if_then_else (ltgt (match_dup 1) (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""{  if (GET_MODE (sparc_compare_op0) == TFmode && ! TARGET_HARD_QUAD)    {      sparc_emit_float_lib_cmp (sparc_compare_op0, sparc_compare_op1, LTGT);      emit_jump_insn (gen_bne (operands[0]));      DONE;    }  operands[1] = gen_compare_reg (LTGT, sparc_compare_op0, sparc_compare_op1);});; Now match both normal and inverted jump.;; XXX fpcmp nop braindamage(define_insn "*normal_branch"  [(set (pc)	(if_then_else (match_operator 0 "noov_compare_op"				      [(reg 100) (const_int 0)])		      (label_ref (match_operand 1 "" ""))		      (pc)))]  ""{  return output_cbranch (operands[0], operands[1], 1, 0,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "icc")]);; XXX fpcmp nop braindamage(define_insn "*inverted_branch"  [(set (pc)	(if_then_else (match_operator 0 "noov_compare_op"				      [(reg 100) (const_int 0)])		      (pc)		      (label_ref (match_operand 1 "" ""))))]  ""{  return output_cbranch (operands[0], operands[1], 1, 1,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "icc")]);; XXX fpcmp nop braindamage(define_insn "*normal_fp_branch"  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(match_operand:CCFP 0 "fcc_reg_operand" "c")				       (const_int 0)])		      (label_ref (match_operand 2 "" ""))		      (pc)))]  ""{  return output_cbranch (operands[1], operands[2], 2, 0,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "fcc")]);; XXX fpcmp nop braindamage(define_insn "*inverted_fp_branch"  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(match_operand:CCFP 0 "fcc_reg_operand" "c")				       (const_int 0)])		      (pc)		      (label_ref (match_operand 2 "" ""))))]  ""{  return output_cbranch (operands[1], operands[2], 2, 1,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "fcc")]);; XXX fpcmp nop braindamage(define_insn "*normal_fpe_branch"  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(match_operand:CCFPE 0 "fcc_reg_operand" "c")				       (const_int 0)])		      (label_ref (match_operand 2 "" ""))		      (pc)))]  ""{  return output_cbranch (operands[1], operands[2], 2, 0,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "fcc")]);; XXX fpcmp nop braindamage(define_insn "*inverted_fpe_branch"  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(match_operand:CCFPE 0 "fcc_reg_operand" "c")				       (const_int 0)])		      (pc)		      (label_ref (match_operand 2 "" ""))))]  ""{  return output_cbranch (operands[1], operands[2], 2, 1,			 final_sequence && INSN_ANNULLED_BRANCH_P (insn),			 insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "fcc")]);; SPARC V9-specific jump insns.  None of these are guaranteed to be;; in the architecture.;; There are no 32 bit brreg insns.;; XXX(define_insn "*normal_int_branch_sp64"  [(set (pc)	(if_then_else (match_operator 0 "v9_regcmp_op"				      [(match_operand:DI 1 "register_operand" "r")				       (const_int 0)])		      (label_ref (match_operand 2 "" ""))		      (pc)))]  "TARGET_ARCH64"{  return output_v9branch (operands[0], operands[2], 1, 2, 0,			  final_sequence && INSN_ANNULLED_BRANCH_P (insn),			  insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "reg")]);; XXX(define_insn "*inverted_int_branch_sp64"  [(set (pc)	(if_then_else (match_operator 0 "v9_regcmp_op"				      [(match_operand:DI 1 "register_operand" "r")				       (const_int 0)])		      (pc)		      (label_ref (match_operand 2 "" ""))))]  "TARGET_ARCH64"{  return output_v9branch (operands[0], operands[2], 1, 2, 1,			  final_sequence && INSN_ANNULLED_BRANCH_P (insn),			  insn);}  [(set_attr "type" "branch")   (set_attr "branch_type" "reg")]);; Load in operand 0 the (absolute) address of operand 1, which is a symbolic;; value subject to a PC-relative relocation.  Operand 2 is a helper function;; that adds the PC value at the call point to operand 0.(define_insn "load_pcrel_sym<P:mode>"  [(set (match_operand:P 0 "register_operand" "=r")	(unspec:P [(match_operand:P 1 "symbolic_operand" "")		   (match_operand:P 2 "call_operand_address" "")] UNSPEC_LOAD_PCREL_SYM))   (clobber (reg:P 15))]  ""{  if (flag_delayed_branch)    return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";  else    return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";}  [(set (attr "type") (const_string "multi"))   (set (attr "length")	(if_then_else (eq_attr "delayed_branch" "true")		      (const_int 3)		      (const_int 4)))]);; Move instructions(define_expand "movqi"  [(set (match_operand:QI 0 "general_operand" "")	(match_operand:QI 1 "general_operand" ""))]  ""{  /* Working with CONST_INTs is easier, so convert     a double if needed.  */  if (GET_CODE (operands[1]) == CONST_DOUBLE)    {      operands[1] = GEN_INT (trunc_int_for_mode			     (CONST_DOUBLE_LOW (operands[1]), QImode));    }  /* Handle sets of MEM first.  */  if (GET_CODE (operands[0]) == MEM)    {      if (reg_or_0_operand (operands[1], QImode))	goto movqi_is_ok;      if (! reload_in_progress)	{	  operands[0] = validize_mem (operands[0]);	  operands[1] = force_reg (QImode, operands[1]);	}    }  /* Fixup TLS cases.  */  if (tls_symbolic_operand (operands [1]))    operands[1] = legitimize_tls_address (operands[1]);  /* Fixup PIC cases.  */  if (flag_pic)    {      if (CONSTANT_P (operands[1])	  && pic_address_needs_scratch (operands[1]))	operands[1] = legitimize_pic_address (operands[1], QImode, 0);      if (symbolic_operand (operands[1], QImode))	{	  operands[1] = legitimize_pic_address (operands[1],						QImode,						(reload_in_progress ?						 operands[0] :						 NULL_RTX));	  goto movqi_is_ok;	}

⌨️ 快捷键说明

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