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

📄 mn10300.md

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 MD
📖 第 1 页 / 共 3 页
字号:
  "* return output_tst (operands[0], insn);"  [(set_attr "cc" "set_znv")])(define_insn ""  [(set (cc0) (zero_extend:SI (match_operand:HI 0 "memory_operand" "dx")))]  ""  "* return output_tst (operands[0], insn);"  [(set_attr "cc" "set_znv")])(define_insn "cmpsi"  [(set (cc0)	(compare (match_operand:SI 0 "register_operand" "!*d*a*x,dax")		 (match_operand:SI 1 "nonmemory_operand" "!*0,daxi")))]  ""  "@  add 0,%0  cmp %1,%0"  [(set_attr "cc" "invert,compare")]);; ----------------------------------------------------------------------;; ADD INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "addsi3"  [(set (match_operand:SI 0 "register_operand" "")	(plus:SI (match_operand:SI 1 "register_operand" "")		 (match_operand:SI 2 "nonmemory_operand" "")))]  ""  "{  /* We can't add a variable amount directly to the stack pointer;     so do so via a temporary register.  */  if (operands[0] == stack_pointer_rtx      && GET_CODE (operands[1]) != CONST_INT      && GET_CODE (operands[2]) != CONST_INT)   {     rtx temp = gen_reg_rtx (SImode);     emit_move_insn (temp, gen_rtx (PLUS, SImode, operands[1], operands[2]));     emit_move_insn (operands[0], temp);     DONE;   }}")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx,ax,ax,dax,xy,!dax")	(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,dax")		 (match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,i,dax")))]  ""  "*{  switch (which_alternative)    {    case 0:    case 1:      return \"inc %0\";    case 2:      return \"inc4 %0\";    case 3:    case 4:      return \"add %2,%0\";    case 5:      /* I'm not sure if this can happen or not.  Might as well be prepared	 and generate the best possible code if it does happen.  */      if (true_regnum (operands[0]) == true_regnum (operands[1]))	return \"add %2,%0\";      if (true_regnum (operands[0]) == true_regnum (operands[2]))	return \"add %1,%0\";      /* We have to copy one of the sources into the destination, then add	 the other source to the destination.	 Carefully select which source to copy to the destination; a naive	 implementation will waste a byte when the source classes are different	 and the destination is an address register.  Selecting the lowest	 cost register copy will optimize this sequence.  */      if (REGNO_REG_CLASS (true_regnum (operands[1]))	  == REGNO_REG_CLASS (true_regnum (operands[0])))	return \"mov %1,%0\;add %2,%0\";      return \"mov %2,%0\;add %1,%0\";    }}"  [(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,none_0hit,set_zn")]);; ----------------------------------------------------------------------;; SUBTRACT INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "subsi3"  [(set (match_operand:SI 0 "register_operand" "")	(minus:SI (match_operand:SI 1 "register_operand" "")		  (match_operand:SI 2 "nonmemory_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dax")	(minus:SI (match_operand:SI 1 "register_operand" "0")		  (match_operand:SI 2 "nonmemory_operand" "daxi")))]  ""  "sub %2,%0"  [(set_attr "cc" "set_zn")])(define_expand "negsi2"  [(set (match_operand:SI 0 "register_operand" "")        (neg:SI (match_operand:SI 1 "register_operand" "")))]  ""  "{  rtx target = gen_reg_rtx (SImode);  emit_move_insn (target, GEN_INT (0));  emit_insn (gen_subsi3 (target, target, operands[1]));  emit_move_insn (operands[0], target);  DONE;}");; ----------------------------------------------------------------------;; MULTIPLY INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "mulsi3"  [(set (match_operand:SI 0 "register_operand" "")	(mult:SI (match_operand:SI 1 "register_operand" "")		 (match_operand:SI 2 "register_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx")	(mult:SI (match_operand:SI 1 "register_operand" "%0")		 (match_operand:SI 2 "register_operand" "dx")))]  ""  "*{  if (TARGET_MULT_BUG)    return \"nop\;nop\;mul %2,%0\";  else    return \"mul %2,%0\";}"  [(set_attr "cc" "set_zn")])(define_insn "udivmodsi4"  [(set (match_operand:SI 0 "general_operand" "=dx")	(udiv:SI (match_operand:SI 1 "general_operand" "0")		 (match_operand:SI 2 "general_operand" "dx")))   (set (match_operand:SI 3 "general_operand" "=&d")	(umod:SI (match_dup 1) (match_dup 2)))]  ""  "*{  output_asm_insn (\"sub %3,%3\;mov %3,mdr\", operands);  if (find_reg_note (insn, REG_UNUSED, operands[3]))    return \"divu %2,%0\";  else    return \"divu %2,%0\;mov mdr,%3\";}"  [(set_attr "cc" "set_zn")])(define_insn "divmodsi4"  [(set (match_operand:SI 0 "general_operand" "=dx")	(div:SI (match_operand:SI 1 "general_operand" "0")		 (match_operand:SI 2 "general_operand" "dx")))   (set (match_operand:SI 3 "general_operand" "=d")	(mod:SI (match_dup 1) (match_dup 2)))]  ""  "*{  if (find_reg_note (insn, REG_UNUSED, operands[3]))    return \"ext %0\;div %2,%0\";  else    return \"ext %0\;div %2,%0\;mov mdr,%3\";}"  [(set_attr "cc" "set_zn")]);; ----------------------------------------------------------------------;; AND INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "andsi3"  [(set (match_operand:SI 0 "register_operand" "")	(and:SI (match_operand:SI 1 "register_operand" "")		(match_operand:SI 2 "nonmemory_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx,dx")	(and:SI (match_operand:SI 1 "register_operand" "%0,0")		(match_operand:SI 2 "nonmemory_operand" "N,dxi")))]  ""  "*{  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xff)    return \"extbu %0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xffff)    return \"exthu %0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0x7fffffff)    return \"add %0,%0\;lsr 1,%0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0x3fffffff)    return \"asl2 %0\;lsr 2,%0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0x1fffffff)    return \"add %0,%0\;asl2 %0\;lsr 3,%0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0x0fffffff)    return \"asl2 %0\;asl2 %0\;lsr 4,%0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xfffffffe)    return \"lsr 1,%0\;add %0,%0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xfffffffc)    return \"lsr 2,%0\;asl2 %0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xfffffff8)    return \"lsr 3,%0\;add %0,%0\;asl2 %0\";  if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 0xfffffff0)    return \"lsr 4,%0\;asl2 %0\;asl2 %0\";  return \"and %2,%0\";}"  [(set_attr "cc" "none_0hit,set_znv")]);; ----------------------------------------------------------------------;; OR INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "iorsi3"  [(set (match_operand:SI 0 "register_operand" "")	(ior:SI (match_operand:SI 1 "register_operand" "")		(match_operand:SI 2 "nonmemory_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx")	(ior:SI (match_operand:SI 1 "register_operand" "%0")		(match_operand:SI 2 "nonmemory_operand" "dxi")))]  ""  "or %2,%0"  [(set_attr "cc" "set_znv")]);; ----------------------------------------------------------------------;; XOR INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "xorsi3"  [(set (match_operand:SI 0 "register_operand" "")	(xor:SI (match_operand:SI 1 "register_operand" "")		(match_operand:SI 2 "nonmemory_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx")	(xor:SI (match_operand:SI 1 "register_operand" "%0")		(match_operand:SI 2 "nonmemory_operand" "dxi")))]  ""  "xor %2,%0"  [(set_attr "cc" "set_znv")]);; ----------------------------------------------------------------------;; NOT INSTRUCTIONS;; ----------------------------------------------------------------------(define_expand "one_cmplsi2"  [(set (match_operand:SI 0 "register_operand" "")	(not:SI (match_operand:SI 1 "register_operand" "")))]  ""  "") (define_insn ""  [(set (match_operand:SI 0 "register_operand" "=dx")	(not:SI (match_operand:SI 1 "register_operand" "0")))]  ""  "not %0"  [(set_attr "cc" "set_znv")]);; -----------------------------------------------------------------;; BIT FIELDS;; -----------------------------------------------------------------;; These set/clear memory in byte sized chunks.;;;; They are no smaller/faster than loading the value into a register;; and storing the register, but they don't need a scratch register;; which may allow for better code generation.(define_insn ""  [(set (match_operand:QI 0 "general_operand" "=R,d") (const_int 0))]  ""  "@  bclr 255,%A0  clr %0"  [(set_attr "cc" "clobber")])(define_insn ""  [(set (match_operand:QI 0 "general_operand" "=R,d") (const_int -1))]  ""  "@  bset 255,%A0  mov -1,%0"  [(set_attr "cc" "clobber,none_0hit")])(define_insn ""  [(set (match_operand:QI 0 "general_operand" "+R,d")	(subreg:QI	  (and:SI (subreg:SI (match_dup 0) 0)		  (match_operand:SI 1 "const_int_operand" "i,i")) 0))]  ""  "@  bclr %N1,%A0  and %1,%0"  [(set_attr "cc" "clobber,set_znv")])(define_insn ""  [(set (match_operand:QI 0 "general_operand" "+R,d")	(subreg:QI	  (ior:SI (subreg:SI (match_dup 0) 0)		  (match_operand:SI 1 "const_int_operand" "i,i")) 0))]  ""  "@  bset %1,%A0  or %1,%0"  [(set_attr "cc" "clobber,set_znv")])(define_insn ""  [(set (cc0)     (zero_extract:SI (match_operand:SI 0 "register_operand" "dx")		      (match_operand 1 "const_int_operand" "")		      (match_operand 2 "const_int_operand" "")))]  ""  "*{  int len = INTVAL (operands[1]);  int bit = INTVAL (operands[2]);  int mask = 0;  rtx xoperands[2];  while (len > 0)    {      mask |= (1 << bit);      bit++;      len--;    }  xoperands[0] = operands[0];  xoperands[1] = GEN_INT (mask);  output_asm_insn (\"btst %1,%0\", xoperands);  return \"\";}"  [(set_attr "cc" "clobber")])(define_insn ""  [(set (cc0)     (zero_extract:SI (match_operand:QI 0 "general_operand" "R,dx")		      (match_operand 1 "const_int_operand" "")		      (match_operand 2 "const_int_operand" "")))]  "mask_ok_for_mem_btst (INTVAL (operands[1]), INTVAL (operands[2]))"  "*{  int len = INTVAL (operands[1]);  int bit = INTVAL (operands[2]);  int mask = 0;  rtx xoperands[2];  while (len > 0)    {      mask |= (1 << bit);      bit++;      len--;    }  /* If the source operand is not a reg (ie it is memory), then extract the     bits from mask that we actually want to test.  Note that the mask will     never cross a byte boundary.  */  if (!REG_P (operands[0]))    {      if (mask & 0xff)	mask = mask & 0xff;      else if (mask & 0xff00)	mask = (mask >> 8) & 0xff;      else if (mask & 0xff0000)	mask = (mask >> 16) & 0xff;      else if (mask & 0xff000000)	mask = (mask >> 24) & 0xff;    }    xoperands[0] = operands[0];  xoperands[1] = GEN_INT (mask);  if (GET_CODE (operands[0]) == REG)    output_asm_insn (\"btst %1,%0\", xoperands);  else    output_asm_insn (\"btst %1,%A0\", xoperands);  return \"\";}"  [(set_attr "cc" "clobber")])(define_insn ""  [(set (cc0) (and:SI (match_operand:SI 0 "register_operand" "dx")		      (match_operand:SI 1 "const_int_operand" "")))]  ""  "btst %1,%0"  [(set_attr "cc" "clobber")])(define_insn ""  [(set (cc0)     (and:SI       (subreg:SI (match_operand:QI 0 "general_operand" "R,dx") 0)       (match_operand:SI 1 "const_8bit_operand" "")))]  ""  "@  btst %1,%A0  btst %1,%0"  [(set_attr "cc" "clobber")]);; ----------------------------------------------------------------------;; JUMP INSTRUCTIONS;; ----------------------------------------------------------------------;; Conditional jump instructions(define_expand "ble"  [(set (pc)	(if_then_else (le (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bleu"  [(set (pc)	(if_then_else (leu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bge"  [(set (pc)	(if_then_else (ge (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bgeu"  [(set (pc)	(if_then_else (geu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "blt"  [(set (pc)	(if_then_else (lt (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bltu"  [(set (pc)	(if_then_else (ltu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bgt"  [(set (pc)	(if_then_else (gt (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bgtu"  [(set (pc)	(if_then_else (gtu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "beq"  [(set (pc)	(if_then_else (eq (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_expand "bne"  [(set (pc)	(if_then_else (ne (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "")(define_insn ""  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(cc0) (const_int 0)])		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "*{  if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0      && (GET_CODE (operands[1]) == GT	  || GET_CODE (operands[1]) == GE	  || GET_CODE (operands[1]) == LE	  || GET_CODE (operands[1]) == LT))    return 0;  return \"b%b1 %0\";}" [(set_attr "cc" "none")])(define_insn ""  [(set (pc)	(if_then_else (match_operator 1 "comparison_operator"				      [(cc0) (const_int 0)])		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "*{  if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0      && (GET_CODE (operands[1]) == GT	  || GET_CODE (operands[1]) == GE	  || GET_CODE (operands[1]) == LE	  || GET_CODE (operands[1]) == LT))    return 0;  return \"b%B1 %0\";}" [(set_attr "cc" "none")]);; Unconditional and other jump instructions.(define_insn "jump"

⌨️ 快捷键说明

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