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

📄 pa.md

📁 早期freebsd实现
💻 MD
📖 第 1 页 / 共 5 页
字号:
	(if_then_else (ge (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    {      emit_insn (gen_cmp_fp (GE, hppa_compare_op0, hppa_compare_op1));      emit_bcond_fp (NE, operands[0]);      DONE;    }  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "ble"  [(set (pc)	(if_then_else (le (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    {      emit_insn (gen_cmp_fp (LE, hppa_compare_op0, hppa_compare_op1));      emit_bcond_fp (NE, operands[0]);      DONE;    }  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "bgtu"  [(set (pc)	(if_then_else (gtu (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "bltu"  [(set (pc)	(if_then_else (ltu (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "bgeu"  [(set (pc)	(if_then_else (geu (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "bleu"  [(set (pc)	(if_then_else (leu (match_dup 1) (match_dup 2))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}");; Match the branch patterns.(define_insn ""  [(set (pc)	(if_then_else	 (match_operator 3 "comparison_operator"			 [(match_operand:SI 1 "register_operand" "r,r")			  (match_operand:SI 2 "arith5_operand" "r,L")])	 (label_ref (match_operand 0 "" ""))	 (pc)))]  ""  "*{  if (which_alternative == 0)    return (get_attr_length (insn) == 1	    ? \"comb,%C3 %1,%2,%0%#\" : \"comclr,%N3 %1,%2,0\;bl %0,0%#\");    {      enum rtx_code comp_code = GET_CODE (operands[3]);      if (!(comp_code == EQ || comp_code == NE))	PUT_CODE (operands[3], reverse_relop (comp_code));      if (get_attr_length (insn) == 1)	return \"comib,%C3 %2,%1,%0%#\";      else	return \"comiclr,%N3 %2,%1,0\;bl %0,0%#\";    }}"[(set_attr "type" "cbranch") (set (attr "length") (if_then_else (lt (abs (minus (match_dup 0)						    (plus (pc) (const_int 2))))					(const_int 1023))				    (const_int 1)				    (const_int 2)))]);; Match the negated branch.(define_insn ""  [(set (pc)	(if_then_else	 (match_operator 3 "comparison_operator"			 [(match_operand:SI 1 "register_operand" "r,r")			  (match_operand:SI 2 "arith5_operand" "r,L")])	 (pc)	 (label_ref (match_operand 0 "" ""))))]  ""  "*{  if (which_alternative == 0)    return (get_attr_length (insn) == 1	    ? \"comb,%N3 %1,%2,%0%#\" : \"comclr,%C3 %1,%2,0\;bl %0,0%#\");    {      enum rtx_code comp_code = GET_CODE (operands[3]);      if (!(comp_code == EQ || comp_code == NE))	PUT_CODE (operands[3], reverse_relop (comp_code));      if (get_attr_length (insn) == 1)	return \"comib,%N3 %2,%1,%0%#\";      else	return \"comiclr,%C3 %2,%1,0%#\;bl %0,0%#\";    }}"[(set_attr "type" "cbranch") (set (attr "length") (if_then_else (lt (abs (minus (match_dup 0)						    (plus (pc) (const_int 2))))					(const_int 1023))				    (const_int 1)				    (const_int 2)))]);; Floating point branches(define_insn ""  [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))			   (label_ref (match_operand 0 "" ""))			   (pc)))]  ""  "*{  if (INSN_ANNULLED_BRANCH_P (insn))    return \"ftest\;bl,n %0,0\";  else    return \"ftest\;bl%* %0,0\";}"  [(set_attr "type" "fbranch")   (set_attr "length" "2")])(define_insn ""  [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))			   (pc)			   (label_ref (match_operand 0 "" ""))))]  ""  "*{  if (INSN_ANNULLED_BRANCH_P (insn))    return \"ftest\;add,tr 0,0,0\;bl,n %0,0\";  else    return \"ftest\;add,tr 0,0,0\;bl%* %0,0\";}"  [(set_attr "type" "fbranch")   (set_attr "length" "3")]);; Move instructions(define_expand "movsi"  [(set (match_operand:SI 0 "general_operand" "")	(match_operand:SI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, SImode, 0))    DONE;}");; Reloading an SImode or DImode value requires a scratch register if;; going in to or out of float point registers.(define_expand "reload_insi"  [(set (match_operand:SI 0 "register_operand" "=z")	(match_operand:SI 1 "general_operand" ""))   (clobber (match_operand:SI 2 "register_operand" "=&r"))]  ""  "{  if (emit_move_sequence (operands, SImode, operands[2]))    DONE;  /* We don't want the clobber emitted, so handle this ourselves.  */  emit_insn (gen_rtx (SET, VOIDmode, operands[0], operands[1]));  DONE;}")(define_expand "reload_outsi"  [(set (match_operand:SI 0 "general_operand" "")	(match_operand:SI 1  "register_operand""z"))   (clobber (match_operand:SI 2 "register_operand" "=&r"))]  ""  "{  if (emit_move_sequence (operands, SImode, operands[2]))    DONE;  /* We don't want the clobber emitted, so handle this ourselves.  */  emit_insn (gen_rtx (SET, VOIDmode, operands[0], operands[1]));  DONE;}");; Moves to and from the shift register.(define_insn ""  [(set (reg:SI 112)	(match_operand:SI 0 "register_operand" "r"))]  ""  "mtsar %0"  [(set_attr "type" "move")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(reg:SI 112))]  ""  "mfctl 11,%0"  [(set_attr "type" "move")]);;; Experimental(define_insn ""  [(set (match_operand:SI 0 "fp_reg_operand" "=fx")	(match_operand:SI 1 "short_memory_operand" "T"))]  ""  "fldws%F1 %1,%0"  [(set_attr "type" "fpload")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "short_memory_operand" "=T")	(match_operand:SI 1 "fp_reg_operand" "fx"))]  ""  "fstws%F0 %1,%0"  [(set_attr "type" "fpstore")   (set_attr "length" "1")]);;; pic symbol refrences(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(mem:SI (plus:SI (match_operand:SI 1 "register_operand" "r")			 (match_operand:SI 2 "symbolic_operand" ""))))]  "flag_pic && operands[1] == pic_offset_table_rtx"  "ldw T'%2(%1),%0"  [(set_attr "type" "load")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "reg_or_nonsymb_mem_operand"			  "=r,r,Q,!r,!fx,!fx")	(match_operand:SI 1 "move_operand" "rM,Q,rM,!fxy,!r,!fx"))]  ""  "@   copy %r1,%0   ldw%M1 %1,%0   stw%M0 %r1,%0   fstws %1,-16(30)\;ldw -16(30),%0   stw %1,-16(30)\;fldws -16(30),%0   fcpy,sgl %1,%0"  [(set_attr "type" "move,load,store,move,move,fpalu")   (set_attr "length" "1,1,1,2,2,1")]);; For pic(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(match_operand:SI 1 "pic_operand" "i"))   (clobber (match_scratch:SI 2 "=a"))]  ""  "*{  rtx label_rtx = gen_label_rtx ();  rtx xoperands[3];  extern FILE *asm_out_file;  xoperands[0] = operands[0];  xoperands[1] = operands[1];  xoperands[2] = label_rtx;  output_asm_insn (\"bl .+8,%0\;addil L'%1-%2,%0\", xoperands);  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (label_rtx));  output_asm_insn (\"ldo R'%1-%2(1),%0\", xoperands);  return \"\";  }"  [(set_attr "type" "multi")   (set_attr "length" "3")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(match_operand:SI 1 "const_int_operand" ""))]  "INT_14_BITS (operands[1]) || (INTVAL (operands[1]) & 0x7ff) == 0"  "*{  if (INT_14_BITS (operands[1]))    return \"ldo %1(0),%0\";  else    return \"ldil L'%1,%0\";}"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(match_operand:SI 1 "depi_cint_operand" ""))]  ""  "*{  rtx xoperands[4];  xoperands[0] = operands[0];  compute_xdepi_operands_from_integer (INTVAL (operands[1]), xoperands);  output_asm_insn (\"zdepi %1,%2,%3,%0\", xoperands);  return \"\";}"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=a,&?*r")	(plus:SI (match_operand:SI 1 "register_operand" "r,r")		 (high:SI (match_operand 2 "" ""))))]  "!TARGET_KERNEL"  "@   addil L'%G2,%1   ldil L'%G2,%0\;add %0,%1,%0"  [(set_attr "type" "binary,binary")   (set_attr "length" "1,2")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=a")	(plus:SI (match_operand:SI 1 "register_operand" "r")		 (high:SI (match_operand 2 "" ""))))]  "TARGET_KERNEL"  "@   addil L'%G2,%1"  [(set_attr "type" "binary")   (set_attr "length" "1")])(define_split  [(set (match_operand:SI 0 "register_operand" "")	(plus:SI (match_operand:SI 1 "register_operand" "")		 (high:SI (match_operand 2 "" ""))))   (clobber (match_scratch:SI 3 ""))]  "reload_completed && REGNO (operands[0]) != 1"  [(set (match_dup 3) (high:SI (match_dup 2)))   (set (match_dup 0) (plus:SI (match_dup 3) (match_dup 1)))]  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(high:SI (match_operand:SI 1 "function_label_operand" "")))]  "TARGET_SHARED_LIBS"  "ldil LP'%G1,%0"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(high:SI (match_operand 1 "" "")))]  "check_pic (1)"  "ldil L'%G1,%0"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:HI 0 "register_operand" "=r")	(high:HI (match_operand 1 "" "")))]  "check_pic (1)"  "ldil L'%G1,%0"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(lo_sum:SI (match_operand:SI 1 "register_operand" "r")		   (match_operand:SI 2 "function_label_operand" "")))   (clobber (match_operand:SI 3 "register_operand" "=r"))]  "TARGET_SHARED_LIBS"  "ldo RP'%G2(%1),%0\;extru,= %0,31,1,%3\;ldw -4(%%r27),%3\;add %0,%3,%0"  [(set_attr "type" "multi")   (set_attr "length" "4")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(lo_sum:SI (match_operand:SI 1 "register_operand" "r")		   (match_operand:SI 2 "immediate_operand" "i")))]  ""  "ldo R'%G2(%1),%0"  ;; Need to set length for this arith insn because operand2  ;; is not an "arith_operand".  [(set_attr "length" "1")])(define_expand "movhi"  [(set (match_operand:HI 0 "general_operand" "")	(match_operand:HI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, HImode, 0))    DONE;}")(define_insn ""  [(set (match_operand:HI 0 "reg_or_nonsymb_mem_operand" "=r,r,Q,!r,!*fx,!*fx")	(match_operand:HI 1 "move_operand" "rM,Q,rM,*fx,r,!*fx"))]  ""  "@   copy %r1,%0   ldh%M1 %1,%0   sth%M0 %r1,%0   fstws %1,-16(30)\;ldw -16(30),%0   stw %1,-16(30)\;fldws -16(30),%0   fcpy,sgl %1,%0"  [(set_attr "type" "move,load,store,move,move,fpalu")   (set_attr "length" "1,1,1,2,2,1")])(define_insn ""  [(set (match_operand:HI 0 "register_operand" "=r")	(match_operand:HI 1 "const_int_operand" ""))]  "INT_14_BITS (operands[1]) || (INTVAL (operands[1]) & 0x7ff) == 0"  "*{  if (INT_14_BITS (operands[1]))    return \"ldo %1(0),%0\";  else    return \"ldil L'%1,%0\";}"  [(set_attr "type" "move")   (set_attr "length" "1")])(define_insn ""  [(set (match_operand:HI 0 "register_operand" "=r")	(match_operand:HI 1 "depi_cint_operand" ""))]  ""  "*{  rtx xoperands[4];

⌨️ 快捷键说明

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