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

📄 i386.md

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
	 (and (match_operand 0 "memory_operand" "")	      (match_operand 1 "memory_operand" ""))	   (const_string "both")	 (match_operand 0 "memory_operand" "")	   (const_string "store")	 (match_operand 1 "memory_operand" "")	   (const_string "load")	 (and (eq_attr "type"		 "!alu1,negnot,ishift1,		   imov,imovx,icmp,test,		   fmov,fcmp,fsgn,		   sse,ssemov,ssecmp,ssecomi,ssecvt,sseicvt,sselog1,		   mmx,mmxmov,mmxcmp,mmxcvt")	      (match_operand 2 "memory_operand" ""))	   (const_string "load")	 (and (eq_attr "type" "icmov")	      (match_operand 3 "memory_operand" ""))	   (const_string "load")	]	(const_string "none")));; Indicates if an instruction has both an immediate and a displacement.(define_attr "imm_disp" "false,true,unknown"  (cond [(eq_attr "type" "other,multi")	   (const_string "unknown")	 (and (eq_attr "type" "icmp,test,imov,alu1,ishift1,rotate1")	      (and (match_operand 0 "memory_displacement_operand" "")		   (match_operand 1 "immediate_operand" "")))	   (const_string "true")	 (and (eq_attr "type" "alu,ishift,rotate,imul,idiv")	      (and (match_operand 0 "memory_displacement_operand" "")		   (match_operand 2 "immediate_operand" "")))	   (const_string "true")	]	(const_string "false")));; Indicates if an FP operation has an integer source.(define_attr "fp_int_src" "false,true"  (const_string "false"));; Defines rounding mode of an FP operation.(define_attr "i387_cw" "floor,ceil,trunc,mask_pm,uninitialized,any"  (const_string "any"));; Describe a user's asm statement.(define_asm_attributes  [(set_attr "length" "128")   (set_attr "type" "multi")]); APPLE LOCAL begin mainline 2005-03-16 4054919;; All x87 floating point modes(define_mode_macro X87MODEF [SF DF XF]) ;; All integer modes handled by x87 fisttp operator.(define_mode_macro X87MODEI [HI SI DI]);; All integer modes handled by integer x87 operators.(define_mode_macro X87MODEI12 [HI SI]);; All SSE floating point modes(define_mode_macro SSEMODEF [SF DF]) ;; All integer modes handled by SSE cvtts?2si* operators.(define_mode_macro SSEMODEI24 [SI DI]); APPLE LOCAL end mainline 2005-03-16 4054919;; Scheduling descriptions(include "pentium.md")(include "ppro.md")(include "k6.md")(include "athlon.md");; Operand and operator predicates(include "predicates.md");; Compare instructions.;; All compare insns have expanders that save the operands away without;; actually generating RTL.  The bCOND or sCOND (emitted immediately;; after the cmp) will actually emit the cmpM.(define_expand "cmpdi"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:DI 0 "nonimmediate_operand" "")		    (match_operand:DI 1 "x86_64_general_operand" "")))]  ""{  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)    operands[0] = force_reg (DImode, operands[0]);  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_expand "cmpsi"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:SI 0 "cmpsi_operand" "")		    (match_operand:SI 1 "general_operand" "")))]  ""{  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)    operands[0] = force_reg (SImode, operands[0]);  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_expand "cmphi"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:HI 0 "nonimmediate_operand" "")		    (match_operand:HI 1 "general_operand" "")))]  ""{  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)    operands[0] = force_reg (HImode, operands[0]);  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_expand "cmpqi"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:QI 0 "nonimmediate_operand" "")		    (match_operand:QI 1 "general_operand" "")))]  "TARGET_QIMODE_MATH"{  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)    operands[0] = force_reg (QImode, operands[0]);  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_insn "cmpdi_ccno_1_rex64"  [(set (reg FLAGS_REG)	(compare (match_operand:DI 0 "nonimmediate_operand" "r,?mr")		 (match_operand:DI 1 "const0_operand" "n,n")))]  "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"  "@   test{q}\t{%0, %0|%0, %0}   cmp{q}\t{%1, %0|%0, %1}"  [(set_attr "type" "test,icmp")   (set_attr "length_immediate" "0,1")   (set_attr "mode" "DI")])(define_insn "*cmpdi_minus_1_rex64"  [(set (reg FLAGS_REG)	(compare (minus:DI (match_operand:DI 0 "nonimmediate_operand" "rm,r")			   (match_operand:DI 1 "x86_64_general_operand" "re,mr"))		 (const_int 0)))]  "TARGET_64BIT && ix86_match_ccmode (insn, CCGOCmode)"  "cmp{q}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "DI")])(define_expand "cmpdi_1_rex64"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:DI 0 "nonimmediate_operand" "")		    (match_operand:DI 1 "general_operand" "")))]  "TARGET_64BIT"  "")(define_insn "cmpdi_1_insn_rex64"  [(set (reg FLAGS_REG)	(compare (match_operand:DI 0 "nonimmediate_operand" "mr,r")		 (match_operand:DI 1 "x86_64_general_operand" "re,mr")))]  "TARGET_64BIT && ix86_match_ccmode (insn, CCmode)"  "cmp{q}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "DI")])(define_insn "*cmpsi_ccno_1"  [(set (reg FLAGS_REG)	(compare (match_operand:SI 0 "nonimmediate_operand" "r,?mr")		 (match_operand:SI 1 "const0_operand" "n,n")))]  "ix86_match_ccmode (insn, CCNOmode)"  "@   test{l}\t{%0, %0|%0, %0}   cmp{l}\t{%1, %0|%0, %1}"  [(set_attr "type" "test,icmp")   (set_attr "length_immediate" "0,1")   (set_attr "mode" "SI")])(define_insn "*cmpsi_minus_1"  [(set (reg FLAGS_REG)	(compare (minus:SI (match_operand:SI 0 "nonimmediate_operand" "rm,r")			   (match_operand:SI 1 "general_operand" "ri,mr"))		 (const_int 0)))]  "ix86_match_ccmode (insn, CCGOCmode)"  "cmp{l}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "SI")])(define_expand "cmpsi_1"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:SI 0 "nonimmediate_operand" "rm,r")		    (match_operand:SI 1 "general_operand" "ri,mr")))]  ""  "")(define_insn "*cmpsi_1_insn"  [(set (reg FLAGS_REG)	(compare (match_operand:SI 0 "nonimmediate_operand" "rm,r")		 (match_operand:SI 1 "general_operand" "ri,mr")))]  "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)    && ix86_match_ccmode (insn, CCmode)"  "cmp{l}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "SI")])(define_insn "*cmphi_ccno_1"  [(set (reg FLAGS_REG)	(compare (match_operand:HI 0 "nonimmediate_operand" "r,?mr")		 (match_operand:HI 1 "const0_operand" "n,n")))]  "ix86_match_ccmode (insn, CCNOmode)"  "@   test{w}\t{%0, %0|%0, %0}   cmp{w}\t{%1, %0|%0, %1}"  [(set_attr "type" "test,icmp")   (set_attr "length_immediate" "0,1")   (set_attr "mode" "HI")])(define_insn "*cmphi_minus_1"  [(set (reg FLAGS_REG)	(compare (minus:HI (match_operand:HI 0 "nonimmediate_operand" "rm,r")			   (match_operand:HI 1 "general_operand" "ri,mr"))		 (const_int 0)))]  "ix86_match_ccmode (insn, CCGOCmode)"  "cmp{w}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "HI")])(define_insn "*cmphi_1"  [(set (reg FLAGS_REG)	(compare (match_operand:HI 0 "nonimmediate_operand" "rm,r")		 (match_operand:HI 1 "general_operand" "ri,mr")))]  "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)   && ix86_match_ccmode (insn, CCmode)"  "cmp{w}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "HI")])(define_insn "*cmpqi_ccno_1"  [(set (reg FLAGS_REG)	(compare (match_operand:QI 0 "nonimmediate_operand" "q,?mq")		 (match_operand:QI 1 "const0_operand" "n,n")))]  "ix86_match_ccmode (insn, CCNOmode)"  "@   test{b}\t{%0, %0|%0, %0}   cmp{b}\t{$0, %0|%0, 0}"  [(set_attr "type" "test,icmp")   (set_attr "length_immediate" "0,1")   (set_attr "mode" "QI")])(define_insn "*cmpqi_1"  [(set (reg FLAGS_REG)	(compare (match_operand:QI 0 "nonimmediate_operand" "qm,q")		 (match_operand:QI 1 "general_operand" "qi,mq")))]  "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)    && ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "*cmpqi_minus_1"  [(set (reg FLAGS_REG)	(compare (minus:QI (match_operand:QI 0 "nonimmediate_operand" "qm,q")			   (match_operand:QI 1 "general_operand" "qi,mq"))		 (const_int 0)))]  "ix86_match_ccmode (insn, CCGOCmode)"  "cmp{b}\t{%1, %0|%0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "*cmpqi_ext_1"  [(set (reg FLAGS_REG)	(compare	  (match_operand:QI 0 "general_operand" "Qm")	  (subreg:QI	    (zero_extract:SI	      (match_operand 1 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)))]  "!TARGET_64BIT && ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%h1, %0|%0, %h1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "*cmpqi_ext_1_rex64"  [(set (reg FLAGS_REG)	(compare	  (match_operand:QI 0 "register_operand" "Q")	  (subreg:QI	    (zero_extract:SI	      (match_operand 1 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)))]  "TARGET_64BIT && ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%h1, %0|%0, %h1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "*cmpqi_ext_2"  [(set (reg FLAGS_REG)	(compare	  (subreg:QI	    (zero_extract:SI	      (match_operand 0 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)	  (match_operand:QI 1 "const0_operand" "n")))]  "ix86_match_ccmode (insn, CCNOmode)"  "test{b}\t%h0, %h0"  [(set_attr "type" "test")   (set_attr "length_immediate" "0")   (set_attr "mode" "QI")])(define_expand "cmpqi_ext_3"  [(set (reg:CC FLAGS_REG)	(compare:CC	  (subreg:QI	    (zero_extract:SI	      (match_operand 0 "ext_register_operand" "")	      (const_int 8)	      (const_int 8)) 0)	  (match_operand:QI 1 "general_operand" "")))]  ""  "")(define_insn "cmpqi_ext_3_insn"  [(set (reg FLAGS_REG)	(compare	  (subreg:QI	    (zero_extract:SI	      (match_operand 0 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)	  (match_operand:QI 1 "general_operand" "Qmn")))]  "!TARGET_64BIT && ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%1, %h0|%h0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "cmpqi_ext_3_insn_rex64"  [(set (reg FLAGS_REG)	(compare	  (subreg:QI	    (zero_extract:SI	      (match_operand 0 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)	  (match_operand:QI 1 "nonmemory_operand" "Qn")))]  "TARGET_64BIT && ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%1, %h0|%h0, %1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")])(define_insn "*cmpqi_ext_4"  [(set (reg FLAGS_REG)	(compare	  (subreg:QI	    (zero_extract:SI	      (match_operand 0 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)	  (subreg:QI	    (zero_extract:SI	      (match_operand 1 "ext_register_operand" "Q")	      (const_int 8)	      (const_int 8)) 0)))]  "ix86_match_ccmode (insn, CCmode)"  "cmp{b}\t{%h1, %h0|%h0, %h1}"  [(set_attr "type" "icmp")   (set_attr "mode" "QI")]);; These implement float point compares.;; %%% See if we can get away with VOIDmode operands on the actual insns,;; which would allow mix and match FP modes on the compares.  Which is what;; the old patterns did, but with many more of them.(define_expand "cmpxf"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:XF 0 "cmp_fp_expander_operand" "")		    (match_operand:XF 1 "cmp_fp_expander_operand" "")))]  "TARGET_80387"{  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_expand "cmpdf"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:DF 0 "cmp_fp_expander_operand" "")		    (match_operand:DF 1 "cmp_fp_expander_operand" "")))]  "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"{  ix86_compare_op0 = operands[0];  ix86_compare_op1 = operands[1];  DONE;})(define_expand "cmpsf"  [(set (reg:CC FLAGS_REG)	(compare:CC (match_operand:SF 0 "cmp_fp_expander_operand" "")		    (match_operand:SF 1 "cmp_fp_expander_operand" "")))]  "TARGET_80387 || TARGET_SSE_MATH"

⌨️ 快捷键说明

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