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

📄 rs6000.md

📁 早期freebsd实现
💻 MD
📖 第 1 页 / 共 5 页
字号:
(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r")			(match_operand:SI 2 "gpc_reg_operand" "r"))))]   ""   "eqv %0,%1,%2")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r")				    (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]   ""   "eqv. %3,%1,%2"   [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (not:SI (xor:SI (match_operand:SI 1 "gpc_reg_operand" "%r")				    (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(not:SI (xor:SI (match_dup 1) (match_dup 2))))]   ""   "eqv. %0,%1,%2"   [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))		(match_operand:SI 2 "gpc_reg_operand" "r")))]  ""  "andc %0,%2,%1")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (match_operand:SI 2 "gpc_reg_operand" "r"))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]  ""  "andc. %3,%2,%1"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (match_operand:SI 2 "gpc_reg_operand" "r"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (not:SI (match_dup 1)) (match_dup 2)))]  ""  "andc. %0,%2,%1"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))		(match_operand:SI 2 "gpc_reg_operand" "r")))]  ""  "orc %0,%2,%1")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (match_operand:SI 2 "gpc_reg_operand" "r"))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]  ""  "orc. %3,%2,%1"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (match_operand:SI 2 "gpc_reg_operand" "r"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (not:SI (match_dup 1)) (match_dup 2)))]  ""  "orc. %0,%2,%1"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))		(not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))]  ""  "nand %0,%1,%2")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]  ""  "nand. %3,%1,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (ior:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (not:SI (match_dup 1)) (not:SI (match_dup 2))))]  ""  "nand. %0,%1,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))		(not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))))]  ""  "nor %0,%1,%2")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]  ""  "nor. %3,%1,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (and:SI (not:SI (match_operand:SI 1 "gpc_reg_operand" "r"))			    (not:SI (match_operand:SI 2 "gpc_reg_operand" "r")))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (not:SI (match_dup 1)) (not:SI (match_dup 2))))]  ""  "nor. %0,%1,%2"  [(set_attr "type" "compare")]);; maskir insn.  We need four forms because things might be in arbitrary;; orders.  Don't define forms that only set CR fields because these;; would modify an input register.(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))			(match_operand:SI 1 "gpc_reg_operand" "0"))		(and:SI (match_dup 2)			(match_operand:SI 3 "gpc_reg_operand" "r"))))]  ""  "maskir %0,%3,%2")(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))			(match_operand:SI 1 "gpc_reg_operand" "0"))		(and:SI (match_operand:SI 3 "gpc_reg_operand" "r")			(match_dup 2))))]  ""  "maskir %0,%3,%2")(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (match_operand:SI 2 "gpc_reg_operand" "r")			(match_operand:SI 3 "gpc_reg_operand" "r"))		(and:SI (not:SI (match_dup 2))			(match_operand:SI 1 "gpc_reg_operand" "0"))))]  ""  "maskir %0,%3,%2")(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (match_operand:SI 3 "gpc_reg_operand" "r")			(match_operand:SI 2 "gpc_reg_operand" "r"))		(and:SI (not:SI (match_dup 2))			(match_operand:SI 1 "gpc_reg_operand" "0"))))]  ""  "maskir %0,%3,%2")(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC	 (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))			 (match_operand:SI 1 "gpc_reg_operand" "0"))		 (and:SI (match_dup 2)			 (match_operand:SI 3 "gpc_reg_operand" "r")))	 (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1))		(and:SI (match_dup 2) (match_dup 3))))]  ""  "maskir. %0,%3,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC	 (ior:SI (and:SI (not:SI (match_operand:SI 2 "gpc_reg_operand" "r"))			 (match_operand:SI 1 "gpc_reg_operand" "0"))		 (and:SI (match_operand:SI 3 "gpc_reg_operand" "r")			 (match_dup 2)))	 (const_int 0)))   (set (match_operand:SI 0 "register_operand" "=r")	(ior:SI (and:SI (not:SI (match_dup 2)) (match_dup 1))		(and:SI (match_dup 3) (match_dup 2))))]  ""  "maskir. %0,%3,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC	 (ior:SI (and:SI (match_operand:SI 2 "gpc_reg_operand" "r")			 (match_operand:SI 3 "gpc_reg_operand" "r"))		 (and:SI (not:SI (match_dup 2))			 (match_operand:SI 1 "gpc_reg_operand" "0")))	 (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (match_dup 2) (match_dup 3))		(and:SI (not:SI (match_dup 2)) (match_dup 1))))]  ""  "maskir. %0,%3,%2"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC	 (ior:SI (and:SI (match_operand:SI 3 "gpc_reg_operand" "r")			 (match_operand:SI 2 "gpc_reg_operand" "r"))		 (and:SI (not:SI (match_dup 2))			 (match_operand:SI 1 "gpc_reg_operand" "0")))	 (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(ior:SI (and:SI (match_dup 3) (match_dup 2))		(and:SI (not:SI (match_dup 2)) (match_dup 1))))]  ""  "maskir. %0,%3,%2"  [(set_attr "type" "compare")]);; Rotate and shift insns, in all their variants.  These support shifts,;; field inserts and extracts, and various combinations thereof.(define_insn "insv"  [(set (zero_extract:SI (match_operand:SI 0 "gpc_reg_operand" "+r")			 (match_operand:SI 1 "const_int_operand" "i")			 (match_operand:SI 2 "const_int_operand" "i"))	(match_operand:SI 3 "gpc_reg_operand" "r"))]  ""  "*{  int start = INTVAL (operands[2]) & 31;  int size = INTVAL (operands[1]) & 31;  operands[4] = gen_rtx (CONST_INT, VOIDmode, 32 - start - size);  operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1);  return \"rlimi %0,%3,%4,%h2,%h1\";}")(define_insn "extzv"  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r")			 (match_operand:SI 2 "const_int_operand" "i")			 (match_operand:SI 3 "const_int_operand" "i")))]  ""  "*{  int start = INTVAL (operands[3]) & 31;  int size = INTVAL (operands[2]) & 31;  if (start + size >= 32)    operands[3] = const0_rtx;  else    operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);  return \"rlinm %0,%1,%3,%s2,31\";}")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r")			 (match_operand:SI 2 "const_int_operand" "i")			 (match_operand:SI 3 "const_int_operand" "i"))		    (const_int 0)))   (clobber (match_scratch:SI 4 "=r"))]  ""  "*{  int start = INTVAL (operands[3]) & 31;  int size = INTVAL (operands[2]) & 31;  /* If the bitfield being tested fits in the upper or lower half of a     word, it is possible to use andiu. or andil. to test it.  This is     useful because the condition register set-use delay is smaller for     andi[ul]. than for rlinm.  This doesn't work when the starting bit     position is 0 because the LT and GT bits may be set wrong.  */  if ((start > 0 && start + size <= 16) || start >= 16)    {      operands[3] = gen_rtx (CONST_INT, VOIDmode,			     ((1 << (16 - (start & 15)))			      - (1 << (16 - (start & 15) - size))));      if (start < 16)	return \"andiu. %4,%1,%3\";      else	return \"andil. %4,%1,%3\";    }    if (start + size >= 32)    operands[3] = const0_rtx;  else    operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);  return \"rlinm. %4,%1,%3,%s2,31\";}"  [(set_attr "type" "compare")])(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r")			 (match_operand:SI 2 "const_int_operand" "i")			 (match_operand:SI 3 "const_int_operand" "i"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(zero_extract:SI (match_dup 1) (match_dup 2) (match_dup 3)))]  ""  "*{  int start = INTVAL (operands[3]) & 31;  int size = INTVAL (operands[2]) & 31;  if (start >= 16 && start + size == 32)    {      operands[3] = gen_rtx (CONST_INT, VOIDmode, (1 << (32 - start)) - 1);      return \"andil. %0,%1,%3\";    }    if (start + size >= 32)    operands[3] = const0_rtx;  else    operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);  return \"rlinm. %0,%1,%3,%s2,31\";}"  [(set_attr "type" "delayed_compare")])(define_insn "rotlsi3"  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")		   (match_operand:SI 2 "reg_or_cint_operand" "ri")))]  ""  "rl%I2nm %0,%1,%h2,0,31")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")			       (match_operand:SI 2 "reg_or_cint_operand" "ri"))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r"))]  ""  "rl%I2nm. %3,%1,%h2,0,31"  [(set_attr "type" "delayed_compare")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x")	(compare:CC (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")			       (match_operand:SI 2 "reg_or_cint_operand" "ri"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(rotate:SI (match_dup 1) (match_dup 2)))]  ""  "rl%I2nm. %0,%1,%h2,0,31"  [(set_attr "type" "delayed_compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")			   (match_operand:SI 2 "reg_or_cint_operand" "ri"))		(match_operand:SI 3 "mask_operand" "L")))]  ""  "rl%I2nm %0,%1,%h2,%m3,%M3")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x")	(compare:CC (and:SI		     (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")				(match_operand:SI 2 "reg_or_cint_operand" "ri"))		     (match_operand:SI 3 "mask_operand" "L"))		    (const_int 0)))   (clobber (match_scratch:SI 4 "=r"))]  ""  "rl%I2nm. %4,%1,%h2,%m3,%M3"  [(set_attr "type" "delayed_compare")])(define_insn ""  [(set (match_operand:CC 4 "cc_reg_operand" "=x")	(compare:CC (and:SI		     (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")				(match_operand:SI 2 "reg_or_cint_operand" "ri"))		     (match_operand:SI 3 "mask_operand" "L"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r")	(and:SI (rotate:SI (match_dup 1) (match_dup 2)) (match_dup 3)))]  ""  "rl%I2nm. %0,%1,%h2,%m3,%M3"  [(set_attr "type" "delayed_compare")])(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(zero_extend:SI	 (subreg:QI	  (rotate:SI (match_operand:SI 1 "gpc_reg_operand" "r")		     (match_operand:SI 2 "reg_or_cint_operand" "ri")) 0)))]

⌨️ 快捷键说明

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