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

📄 vax.md

📁 linux下的gcc编译器
💻 MD
📖 第 1 页 / 共 4 页
字号:
   xorw3 %2,%1,%0")(define_insn "xorqi3"  [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g,g")	(xor:QI (match_operand:QI 1 "general_operand" "0,g,g")		(match_operand:QI 2 "general_operand" "g,0,g")))]  ""  "@   xorb2 %2,%0   xorb2 %1,%0   xorb3 %2,%1,%0")(define_insn "negdf2"  [(set (match_operand:DF 0 "nonimmediate_operand" "=g")	(neg:DF (match_operand:DF 1 "general_operand" "gF")))]  ""  "mneg%# %1,%0")(define_insn "negsf2"  [(set (match_operand:SF 0 "nonimmediate_operand" "=g")	(neg:SF (match_operand:SF 1 "general_operand" "gF")))]  ""  "mnegf %1,%0")(define_insn "negsi2"  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(neg:SI (match_operand:SI 1 "general_operand" "g")))]  ""  "mnegl %1,%0")(define_insn "neghi2"  [(set (match_operand:HI 0 "nonimmediate_operand" "=g")	(neg:HI (match_operand:HI 1 "general_operand" "g")))]  ""  "mnegw %1,%0")(define_insn "negqi2"  [(set (match_operand:QI 0 "nonimmediate_operand" "=g")	(neg:QI (match_operand:QI 1 "general_operand" "g")))]  ""  "mnegb %1,%0")(define_insn "one_cmplsi2"  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(not:SI (match_operand:SI 1 "general_operand" "g")))]  ""  "mcoml %1,%0")(define_insn "one_cmplhi2"  [(set (match_operand:HI 0 "nonimmediate_operand" "=g")	(not:HI (match_operand:HI 1 "general_operand" "g")))]  ""  "mcomw %1,%0")(define_insn "one_cmplqi2"  [(set (match_operand:QI 0 "nonimmediate_operand" "=g")	(not:QI (match_operand:QI 1 "general_operand" "g")))]  ""  "mcomb %1,%0");; Arithmetic right shift on the VAX works by negating the shift count,;; then emitting a right shift with the shift count negated.  This means;; that all actual shift counts in the RTL will be positive.  This ;; prevents converting shifts to ZERO_EXTRACTs with negative positions,;; which isn't valid.(define_expand "ashrsi3"  [(set (match_operand:SI 0 "general_operand" "=g")	(ashiftrt:SI (match_operand:SI 1 "general_operand" "g")		   (match_operand:QI 2 "general_operand" "g")))]  ""  "{  if (GET_CODE (operands[2]) != CONST_INT)    operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2]));}")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(ashiftrt:SI (match_operand:SI 1 "general_operand" "g")		     (match_operand:QI 2 "const_int_operand" "n")))]  ""  "ashl $%n2,%1,%0")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(ashiftrt:SI (match_operand:SI 1 "general_operand" "g")		     (neg:QI (match_operand:QI 2 "general_operand" "g"))))]  ""  "ashl %2,%1,%0")(define_insn "ashlsi3"  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(ashift:SI (match_operand:SI 1 "general_operand" "g")		   (match_operand:QI 2 "general_operand" "g")))]  ""  "*{  if (operands[2] == const1_rtx && rtx_equal_p (operands[0], operands[1]))    return \"addl2 %0,%0\";  if (GET_CODE (operands[1]) == REG      && GET_CODE (operands[2]) == CONST_INT)    {      int i = INTVAL (operands[2]);      if (i == 1)	return \"addl3 %1,%1,%0\";      if (i == 2)	return \"moval 0[%1],%0\";      if (i == 3)	return \"movad 0[%1],%0\";    }  return \"ashl %2,%1,%0\";}");; Arithmetic right shift on the VAX works by negating the shift count.(define_expand "ashrdi3"  [(set (match_operand:DI 0 "general_operand" "=g")	(ashiftrt:DI (match_operand:DI 1 "general_operand" "g")		     (match_operand:QI 2 "general_operand" "g")))]  ""  "{  operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2]));}")(define_insn "ashldi3"  [(set (match_operand:DI 0 "nonimmediate_operand" "=g")	(ashift:DI (match_operand:DI 1 "general_operand" "g")		   (match_operand:QI 2 "general_operand" "g")))]  ""  "ashq %2,%1,%0")(define_insn ""  [(set (match_operand:DI 0 "nonimmediate_operand" "=g")	(ashiftrt:DI (match_operand:DI 1 "general_operand" "g")		     (neg:QI (match_operand:QI 2 "general_operand" "g"))))]  ""  "ashq %2,%1,%0");; We used to have expand_shift handle logical right shifts by using extzv,;; but this make it very difficult to do lshrdi3.  Since the VAX is the;; only machine with this kludge, it's better to just do this with a;; define_expand and remove that case from expand_shift.(define_expand "lshrsi3"  [(set (match_dup 3)	(minus:QI (const_int 32)		  (match_dup 4)))   (set (match_operand:SI 0 "general_operand" "=g")	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")			 (match_dup 3)			 (match_operand:SI 2 "register_operand" "g")))]  ""  "{  operands[3] = gen_reg_rtx (QImode);  operands[4] = gen_lowpart (QImode, operands[2]);}");; Rotate right on the VAX works by negating the shift count.(define_expand "rotrsi3"  [(set (match_operand:SI 0 "general_operand" "=g")	(rotatert:SI (match_operand:SI 1 "general_operand" "g")		     (match_operand:QI 2 "general_operand" "g")))]  ""  "{  if (GET_CODE (operands[2]) != CONST_INT)    operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2]));}")(define_insn "rotlsi3"  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(rotate:SI (match_operand:SI 1 "general_operand" "g")		   (match_operand:QI 2 "general_operand" "g")))]  ""  "rotl %2,%1,%0")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(rotatert:SI (match_operand:SI 1 "general_operand" "g")		     (match_operand:QI 2 "const_int_operand" "n")))]  ""  "rotl %R2,%1,%0")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(rotatert:SI (match_operand:SI 1 "general_operand" "g")		     (neg:QI (match_operand:QI 2 "general_operand" "g"))))]  ""  "rotl %2,%1,%0");This insn is probably slower than a multiply and an add.;(define_insn "";  [(set (match_operand:SI 0 "general_operand" "=g");	(mult:SI (plus:SI (match_operand:SI 1 "general_operand" "g");			  (match_operand:SI 2 "general_operand" "g"));		 (match_operand:SI 3 "general_operand" "g")))];  "";  "index %1,$0x80000000,$0x7fffffff,%3,%2,%0");; Special cases of bit-field insns which we should;; recognize in preference to the general case.;; These handle aligned 8-bit and 16-bit fields,;; which can usually be done with move instructions.(define_insn ""  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+ro")			 (match_operand:QI 1 "const_int_operand" "n")			 (match_operand:SI 2 "const_int_operand" "n"))	(match_operand:SI 3 "general_operand" "g"))]   "(INTVAL (operands[1]) == 8 || INTVAL (operands[1]) == 16)   && INTVAL (operands[2]) % INTVAL (operands[1]) == 0   && (GET_CODE (operands[0]) == REG       || ! mode_dependent_address_p (XEXP (operands[0], 0)))"  "*{  if (REG_P (operands[0]))    {      if (INTVAL (operands[2]) != 0)	return \"insv %3,%2,%1,%0\";    }  else    operands[0]      = adjust_address (operands[0],			INTVAL (operands[1]) == 8 ? QImode : HImode,			INTVAL (operands[2]) / 8);  CC_STATUS_INIT;  if (INTVAL (operands[1]) == 8)    return \"movb %3,%0\";  return \"movw %3,%0\";}")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=&g")	(zero_extract:SI (match_operand:SI 1 "register_operand" "ro")			 (match_operand:QI 2 "const_int_operand" "n")			 (match_operand:SI 3 "const_int_operand" "n")))]  "(INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16)   && INTVAL (operands[3]) % INTVAL (operands[2]) == 0   && (GET_CODE (operands[1]) == REG       || ! mode_dependent_address_p (XEXP (operands[1], 0)))"  "*{  if (REG_P (operands[1]))    {      if (INTVAL (operands[3]) != 0)	return \"extzv %3,%2,%1,%0\";    }  else    operands[1]      = adjust_address (operands[1],			INTVAL (operands[2]) == 8 ? QImode : HImode,			INTVAL (operands[3]) / 8);  if (INTVAL (operands[2]) == 8)    return \"movzbl %1,%0\";  return \"movzwl %1,%0\";}")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(sign_extract:SI (match_operand:SI 1 "register_operand" "ro")			 (match_operand:QI 2 "const_int_operand" "n")			 (match_operand:SI 3 "const_int_operand" "n")))]  "(INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16)   && INTVAL (operands[3]) % INTVAL (operands[2]) == 0   && (GET_CODE (operands[1]) == REG       || ! mode_dependent_address_p (XEXP (operands[1], 0)))"  "*{  if (REG_P (operands[1]))    {      if (INTVAL (operands[3]) != 0)	return \"extv %3,%2,%1,%0\";    }  else    operands[1]      = adjust_address (operands[1],			INTVAL (operands[2]) == 8 ? QImode : HImode,			INTVAL (operands[3]) / 8);  if (INTVAL (operands[2]) == 8)    return \"cvtbl %1,%0\";  return \"cvtwl %1,%0\";}");; Register-only SImode cases of bit-field insns.(define_insn ""  [(set (cc0)	(compare	 (sign_extract:SI (match_operand:SI 0 "register_operand" "r")			  (match_operand:QI 1 "general_operand" "g")			  (match_operand:SI 2 "general_operand" "g"))	 (match_operand:SI 3 "general_operand" "g")))]  ""  "cmpv %2,%1,%0,%3")(define_insn ""  [(set (cc0)	(compare	 (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			  (match_operand:QI 1 "general_operand" "g")			  (match_operand:SI 2 "general_operand" "g"))	 (match_operand:SI 3 "general_operand" "g")))]  ""  "cmpzv %2,%1,%0,%3");; When the field position and size are constant and the destination;; is a register, extv and extzv are much slower than a rotate followed;; by a bicl or sign extension.  Because we might end up choosing ext[z]v;; anyway, we can't allow immediate values for the primary source operand.(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(sign_extract:SI (match_operand:SI 1 "register_operand" "ro")			 (match_operand:QI 2 "general_operand" "g")			 (match_operand:SI 3 "general_operand" "g")))]  ""  "*{  if (GET_CODE (operands[3]) != CONST_INT || GET_CODE (operands[2]) != CONST_INT      || GET_CODE (operands[0]) != REG      || (INTVAL (operands[2]) != 8 && INTVAL (operands[2]) != 16))    return \"extv %3,%2,%1,%0\";  if (INTVAL (operands[2]) == 8)    return \"rotl %R3,%1,%0\;cvtbl %0,%0\";  return \"rotl %R3,%1,%0\;cvtwl %0,%0\";}")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(zero_extract:SI (match_operand:SI 1 "register_operand" "ro")			 (match_operand:QI 2 "general_operand" "g")			 (match_operand:SI 3 "general_operand" "g")))]  ""  "*{  if (GET_CODE (operands[3]) != CONST_INT || GET_CODE (operands[2]) != CONST_INT      || GET_CODE (operands[0]) != REG)    return \"extzv %3,%2,%1,%0\";  if (INTVAL (operands[2]) == 8)    return \"rotl %R3,%1,%0\;movzbl %0,%0\";  if (INTVAL (operands[2]) == 16)    return \"rotl %R3,%1,%0\;movzwl %0,%0\";  if (INTVAL (operands[3]) & 31)    return \"rotl %R3,%1,%0\;bicl2 %M2,%0\";  if (rtx_equal_p (operands[0], operands[1]))    return \"bicl2 %M2,%0\";  return \"bicl3 %M2,%1,%0\";}");; Non-register cases.;; nonimmediate_operand is used to make sure that mode-ambiguous cases;; don't match these (and therefore match the cases above instead).(define_insn ""  [(set (cc0)	(compare	 (sign_extract:SI (match_operand:QI 0 "memory_operand" "m")			  (match_operand:QI 1 "general_operand" "g")			  (match_operand:SI 2 "general_operand" "g"))	 (match_operand:SI 3 "general_operand" "g")))]  ""  "cmpv %2,%1,%0,%3")(define_insn ""  [(set (cc0)	(compare	 (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "rm")			  (match_operand:QI 1 "general_operand" "g")			  (match_operand:SI 2 "general_operand" "g"))	 (match_operand:SI 3 "general_operand" "g")))]  ""  "cmpzv %2,%1,%0,%3")(define_insn "extv"  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(sign_extract:SI (match_operand:QI 1 "memory_operand" "m")			 (match_operand:QI 2 "general_operand" "g")			 (match_operand:SI 3 "general_operand" "g")))]  ""  "*{  if (GET_CODE (operands[0]) != REG || GET_CODE (operands[2]) != CONST_INT      || GET_CODE (operands[3]) != CONST_INT      || (INTVAL (operands[2]) != 8 && INTVAL (operands[2]) != 16)      || INTVAL (operands[2]) + INTVAL (operands[3]) > 32      || side_effects_p (operands[1])      || (GET_CODE (operands[1]) == MEM	  && mode_dependent_address_p (XEXP (operands[1], 0))))    return \"extv %3,%2,%1,%0\";  if (INTVAL (operands[2]) == 8)    return \"rotl %R3,%1,%0\;cvtbl %0,%0\";  return \"rotl %R3,%1,%0\;cvtwl %0,%0\";}")(define_expand "extzv"  [(set (match_operand:SI 0 "general_operand" "")	(zero_extract:SI (match_operand:SI 1 "general_operand" "")			 (match_operand:QI 2 "general_operand" "")			 (match_operand:SI 3 "general_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")	(zero_extract:SI (match_operand:QI 1 "memory_operand" "m")			 (match_operand:QI 2 "general_operand" "g")			 (match_operand:SI 3 "general_operand" "g")))]  ""  "*{  if (GET_CODE (operands[0]) != REG || GET_CODE (operands[2]) != CONST_INT      || GET_CODE (operands[3]) != CONST_INT      || INTVAL (operands[2]) + INTVAL (operands[3]) > 32      || side_effects_p (operands[1])      || (GET_CODE (operands[1]) == MEM	  && mode_dependent_address_p (XEXP (operands[1], 0))))    return \"extzv %3,%2,%1,%0\";  if (INTVAL (operands[2]) == 8)    return \"rotl %R3,%1,%0\;movzbl %0,%0\";  if (INTVAL (operands[2]) == 16)    return \"rotl %R3,%1,%0\;movzwl %0,%0\";  return \"rotl %R3,%1,%0\;bicl2 %M2,%0\";}")(define_expand "insv"  [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "")			 (match_operand:QI 1 "general_operand" "")			 (match_operand:SI 2 "general_operand" ""))	(match_operand:SI 3 "general_operand" ""))]  ""  "")(define_insn ""  [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+g")			 (match_operand:QI 1 "general_operand" "g")			 (match_operand:SI 2 "general_operand" "g"))	(match_operand:SI 3 "general_operand" "g"))]  ""  "insv %3,%2,%1,%0")(define_insn ""  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")			 (match_operand:QI 1 "general_operand" "g")			 (match_operand:SI 2 "general_operand" "g"))	(match_operand:SI 3 "general_operand" "g"))]  ""  "insv %3,%2,%1,%0")(define_insn "jump"  [(set (pc)	(label_ref (match_operand 0 "" "")))]  ""  "jbr %l0")(define_insn "beq"  [(set (pc)	(if_then_else (eq (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jeql %l0")(define_insn "bne"  [(set (pc)	(if_then_else (ne (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jneq %l0")(define_insn "bgt"  [(set (pc)	(if_then_else (gt (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jgtr %l0")(define_insn "bgtu"  [(set (pc)	(if_then_else (gtu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jgtru %l0")(define_insn "blt"  [(set (pc)	(if_then_else (lt (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jlss %l0")(define_insn "bltu"  [(set (pc)	(if_then_else (ltu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jlssu %l0")(define_insn "bge"  [(set (pc)	(if_then_else (ge (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jgeq %l0")(define_insn "bgeu"  [(set (pc)	(if_then_else (geu (cc0)			   (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jgequ %l0")(define_insn "ble"  [(set (pc)	(if_then_else (le (cc0)			  (const_int 0))		      (label_ref (match_operand 0 "" ""))		      (pc)))]  ""  "jleq %l0")(define_insn "bleu"  [(set (pc)	(if_then_else (leu (cc0)

⌨️ 快捷键说明

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