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

📄 pdp11.md

📁 linux下的gcc编译器
💻 MD
📖 第 1 页 / 共 4 页
字号:
					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (ne (cc0)			  (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"beq\", \"bne\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (gt (cc0)			  (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"ble\", \"bgt\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (gtu (cc0)			   (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"blos\", \"bhi\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (lt (cc0)			  (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"bge\", \"blt\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (ltu (cc0)			   (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"bhis\", \"blo\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (ge (cc0)			  (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""    "* return output_jump(\"blt\", \"bge\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (geu (cc0)			   (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"blo\", \"bhis\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (le (cc0)			  (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"bgt\", \"ble\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))])(define_insn ""  [(set (pc)	(if_then_else (leu (cc0)			   (const_int 0))		      (pc)		      (label_ref (match_operand 0 "" ""))))]  ""  "* return output_jump(\"bhi\", \"blos\", get_attr_length(insn));"  [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)						      (pc))					       (const_int -128))					   (ge (minus (match_dup 0)						      (pc))					       (const_int 128)))				      (const_int 3)				      (const_int 1)))]);; Move instructions(define_insn "movdi"  [(set (match_operand:DI 0 "general_operand" "=g,rm,o")	(match_operand:DI 1 "general_operand" "m,r,a"))]  ""  "* return output_move_quad (operands);";; what's the mose expensive code - say twice movsi = 16  [(set_attr "length" "16,16,16")])(define_insn "movsi"  [(set (match_operand:SI 0 "general_operand" "=r,r,r,rm,m")	(match_operand:SI 1 "general_operand" "rN,IJ,K,m,r"))]  ""  "* return output_move_double (operands);";; what's the most expensive code ? - I think 8!;; we could split it up and make several sub-cases...  [(set_attr "length" "2,3,4,8,8")])(define_insn "movhi"  [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")	(match_operand:HI 1 "general_operand" "rRN,Qi,rRN,Qi"))]  ""  "*{  if (operands[1] == const0_rtx)    return \"clr %0\";  return \"mov %1, %0\";}"  [(set_attr "length" "1,2,2,3")])(define_insn "movqi"  [(set (match_operand:QI 0 "nonimmediate_operand" "=g")	(match_operand:QI 1 "general_operand" "g"))]  ""  "*{  if (operands[1] == const0_rtx)    return \"clrb %0\";  return \"movb %1, %0\";}"  [(set_attr "length" "1")]);; do we have to supply all these moves? e.g. to ;; NO_LOAD_FPU_REGs ? (define_insn "movdf"  [(set (match_operand:DF 0 "general_operand" "=a,fR,a,Q,m")        (match_operand:DF 1 "general_operand" "fFR,a,Q,a,m"))]  ""  "* if (which_alternative ==0)       return \"ldd %1, %0\";     else if (which_alternative == 1)       return \"std %1, %0\";     else        return output_move_quad (operands); ";; just a guess..  [(set_attr "length" "1,1,5,5,16")])(define_insn "movsf"  [(set (match_operand:SF 0 "general_operand" "=g,r,g")        (match_operand:SF 1 "general_operand" "r,rmF,g"))]  "TARGET_FPU"  "* return output_move_double (operands);"  [(set_attr "length" "8,8,8")]);; maybe fiddle a bit with move_ratio, then ;; let constraints only accept a register ...(define_expand "movstrhi"  [(parallel [(set (match_operand:BLK 0 "general_operand" "=g,g")		   (match_operand:BLK 1 "general_operand" "g,g"))	      (use (match_operand:HI 2 "arith_operand" "n,&mr"))	      (use (match_operand:HI 3 "immediate_operand" "i,i"))	      (clobber (match_scratch:HI 4 "=&r,X"))	      (clobber (match_dup 5))	      (clobber (match_dup 6))	      (clobber (match_dup 2))])]  "(TARGET_BCOPY_BUILTIN)"  "{  operands[0]    = replace_equiv_address (operands[0],			     copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));  operands[1]    = replace_equiv_address (operands[1],			     copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));  operands[5] = XEXP (operands[0], 0);  operands[6] = XEXP (operands[1], 0);}")(define_insn "" ; "movstrhi"  [(set (mem:BLK (match_operand:HI 0 "general_operand" "=r,r"))	(mem:BLK (match_operand:HI 1 "general_operand" "r,r")))   (use (match_operand:HI 2 "arith_operand" "n,&r"))   (use (match_operand:HI 3 "immediate_operand" "i,i"))   (clobber (match_scratch:HI 4 "=&r,X"))   (clobber (match_dup 0))   (clobber (match_dup 1))   (clobber (match_dup 2))]  "(TARGET_BCOPY_BUILTIN)"  "* return output_block_move (operands);";;; just a guess  [(set_attr "length" "40")])   ;;- truncation instructions(define_insn  "truncdfsf2"  [(set (match_operand:SF 0 "general_operand" "=r,R,Q")	(float_truncate:SF (match_operand:DF 1 "register_operand" "a,a,a")))]  "TARGET_FPU"  "* if (which_alternative ==0)     {       output_asm_insn(\"{stcdf|movfo} %1, -(sp)\", operands);       output_asm_insn(\"mov (sp)+, %0\", operands);       operands[0] = gen_rtx_REG (HImode, REGNO (operands[0])+1);       output_asm_insn(\"mov (sp)+, %0\", operands);       return \"\";     }     else if (which_alternative == 1)       return \"{stcdf|movfo} %1, %0\";     else        return \"{stcdf|movfo} %1, %0\";  "  [(set_attr "length" "3,1,2")])(define_expand "truncsihi2"  [(set (match_operand:HI 0 "general_operand" "=g")	(subreg:HI 	  (match_operand:SI 1 "general_operand" "or")          0))]  ""  "");;- zero extension instructions(define_insn "zero_extendqihi2"  [(set (match_operand:HI 0 "general_operand" "=r")	(zero_extend:HI (match_operand:QI 1 "general_operand" "0")))]  ""  "bic $0177400, %0"  [(set_attr "length" "2")])			 (define_expand "zero_extendhisi2"  [(set (subreg:HI           (match_dup 0)          2)        (match_operand:HI 1 "register_operand" "r"))   (set (subreg:HI           (match_operand:SI 0 "register_operand" "=r")          0)        (const_int 0))]  ""  "/* operands[1] = make_safe_from (operands[1], operands[0]); */");;- sign extension instructions(define_insn "extendsfdf2"  [(set (match_operand:DF 0 "register_operand" "=a,a,a")	(float_extend:DF (match_operand:SF 1 "general_operand" "r,R,Q")))]  "TARGET_FPU"  "@   mov %1, -(sp)\;{ldcfd|movof} (sp)+,%0   {ldcfd|movof} %1, %0   {ldcfd|movof} %1, %0"  [(set_attr "length" "2,1,2")]);; does movb sign extend in register-to-register move?(define_insn "extendqihi2"  [(set (match_operand:HI 0 "register_operand" "=r,r")	(sign_extend:HI (match_operand:QI 1 "general_operand" "rR,Q")))]  ""  "movb %1, %0"  [(set_attr "length" "1,2")])(define_insn "extendqisi2"  [(set (match_operand:SI 0 "register_operand" "=r,r")	(sign_extend:SI (match_operand:QI 1 "general_operand" "rR,Q")))]  "TARGET_40_PLUS"  "*{  rtx latehalf[2];  /* make register pair available */  latehalf[0] = operands[0];  operands[0] = gen_rtx_REG (HImode, REGNO (operands[0])+ 1);  output_asm_insn(\"movb %1, %0\", operands);  output_asm_insn(\"sxt %0\", latehalf);      return \"\";}"  [(set_attr "length" "2,3")]);; maybe we have to use define_expand to say that we have the instruction,;; unconditionally, and then match dependent on CPU type:(define_expand "extendhisi2"  [(set (match_operand:SI 0 "general_operand" "=g")	(sign_extend:SI (match_operand:HI 1 "general_operand" "g")))]  ""  "")  (define_insn "" ; "extendhisi2"  [(set (match_operand:SI 0 "general_operand" "=o,<,r")	(sign_extend:SI (match_operand:HI 1 "general_operand" "g,g,g")))]  "TARGET_40_PLUS"  "*{  rtx latehalf[2];  /* we don't want to mess with auto increment */    switch (which_alternative)  {    case 0:      latehalf[0] = operands[0];      operands[0] = adjust_address(operands[0], HImode, 2);        output_asm_insn(\"mov %1, %0\", operands);      output_asm_insn(\"sxt %0\", latehalf);      return \"\";    case 1:      /* - auto-decrement - right direction ;-) */      output_asm_insn(\"mov %1, %0\", operands);      output_asm_insn(\"sxt %0\", operands);      return \"\";    case 2:      /* make register pair available */      latehalf[0] = operands[0];      operands[0] = gen_rtx_REG (HImode, REGNO (operands[0]) + 1);      output_asm_insn(\"mov %1, %0\", operands);      output_asm_insn(\"sxt %0\", latehalf);      return \"\";    default:      abort();  }}"  [(set_attr "length" "5,3,3")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(sign_extend:SI (match_operand:HI 1 "general_operand" "0")))]  "(! TARGET_40_PLUS)"  "*{  static int count = 0;  char buf[100];  rtx lateoperands[2];  lateoperands[0] = operands[0];  operands[0] = gen_rtx_REG (HImode, REGNO (operands[0]) + 1);  output_asm_insn(\"tst %0\", operands);  sprintf(buf, \"bge extendhisi%d\", count);  output_asm_insn(buf, NULL);  output_asm_insn(\"mov -1, %0\", lateoperands);  sprintf(buf, \"bne extendhisi%d\", count+1);  output_asm_insn(buf, NULL);  sprintf(buf, \"\\nextendhisi%d:\", count);  output_asm_insn(buf, NULL);  output_asm_insn(\"clr %0\", lateoperands);  sprintf(buf, \"\\nextendhisi%d:\", count+1);  output_asm_insn(buf, NULL);  count += 2;  return \"\";}"  [(set_attr "length" "6")]);; make float to int and vice versa ;; using the cc_status.flag field we could probably cut down;; on seti and setl;; assume that we are normally in double and integer mode -;; what do pdp library routines do to fpu mode ?(define_insn "floatsidf2"  [(set (match_operand:DF 0 "register_operand" "=a,a,a")	(float:DF (match_operand:SI 1 "general_operand" "r,R,Q")))]

⌨️ 快捷键说明

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