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

📄 altivec.md

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 MD
📖 第 1 页 / 共 5 页
字号:
  "TARGET_ALTIVEC"  "vavguw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vavgsw"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")                      (match_operand:V4SI 2 "register_operand" "v")] 49))]  "TARGET_ALTIVEC"  "vavgsw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpbfp"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")] 50))]  "TARGET_ALTIVEC"  "vcmpbfp %0,%1,%2"  [(set_attr "type" "veccmp")])(define_insn "altivec_vcmpequb"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")                       (match_operand:V16QI 2 "register_operand" "v")] 51))]  "TARGET_ALTIVEC"  "vcmpequb %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpequh"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")                      (match_operand:V8HI 2 "register_operand" "v")] 52))]  "TARGET_ALTIVEC"  "vcmpequh %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpequw"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")                      (match_operand:V4SI 2 "register_operand" "v")] 53))]  "TARGET_ALTIVEC"  "vcmpequw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpeqfp"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")] 54))]  "TARGET_ALTIVEC"  "vcmpeqfp %0,%1,%2"  [(set_attr "type" "veccmp")])(define_insn "altivec_vcmpgefp"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")] 55))]  "TARGET_ALTIVEC"  "vcmpgefp %0,%1,%2"  [(set_attr "type" "veccmp")])(define_insn "altivec_vcmpgtub"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")                       (match_operand:V16QI 2 "register_operand" "v")] 56))]  "TARGET_ALTIVEC"  "vcmpgtub %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtsb"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")                       (match_operand:V16QI 2 "register_operand" "v")] 57))]  "TARGET_ALTIVEC"  "vcmpgtsb %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtuh"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")                      (match_operand:V8HI 2 "register_operand" "v")] 58))]  "TARGET_ALTIVEC"  "vcmpgtuh %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtsh"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")                      (match_operand:V8HI 2 "register_operand" "v")] 59))]  "TARGET_ALTIVEC"  "vcmpgtsh %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtuw"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")                      (match_operand:V4SI 2 "register_operand" "v")] 60))]  "TARGET_ALTIVEC"  "vcmpgtuw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtsw"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")                      (match_operand:V4SI 2 "register_operand" "v")] 61))]  "TARGET_ALTIVEC"  "vcmpgtsw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_vcmpgtfp"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")] 62))]  "TARGET_ALTIVEC"  "vcmpgtfp %0,%1,%2"  [(set_attr "type" "veccmp")]);; Fused multiply add(define_insn "altivec_vmaddfp"  [(set (match_operand:V4SF 0 "register_operand" "=v")	(plus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v")			      (match_operand:V4SF 2 "register_operand" "v"))	  	   (match_operand:V4SF 3 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaddfp %0,%1,%2,%3"  [(set_attr "type" "vecfloat")]);; We do multiply as a fused multiply-add with an add of a -0.0 vector.(define_expand "mulv4sf3"  [(use (match_operand:V4SF 0 "register_operand" ""))   (use (match_operand:V4SF 1 "register_operand" ""))   (use (match_operand:V4SF 2 "register_operand" ""))]  "TARGET_ALTIVEC && TARGET_FUSED_MADD"  "{  rtx neg0;  /* Generate [-0.0, -0.0, -0.0, -0.0].  */  neg0 = gen_reg_rtx (V4SFmode);  emit_insn (gen_altivec_vspltisw_v4sf (neg0, GEN_INT (-1)));  emit_insn (gen_altivec_vslw_v4sf (neg0, neg0, neg0));  /* Use the multiply-add.  */  emit_insn (gen_altivec_vmaddfp (operands[0], operands[1], operands[2],				  neg0));  DONE;}");; Fused multiply subtract (define_insn "altivec_vnmsubfp"  [(set (match_operand:V4SF 0 "register_operand" "=v")	(minus:V4SF (mult:V4SF (match_operand:V4SF 1 "register_operand" "v")			       (match_operand:V4SF 2 "register_operand" "v"))	  	    (match_operand:V4SF 3 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vnmsubfp %0,%1,%2,%3"  [(set_attr "type" "vecfloat")])(define_insn "altivec_vmsumubm"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v")		      (match_operand:V16QI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 65))]  "TARGET_ALTIVEC"  "vmsumubm %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmsummbm"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V16QI 1 "register_operand" "v")		      (match_operand:V16QI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 66))]  "TARGET_ALTIVEC"  "vmsumubm %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmsumuhm"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 67))]  "TARGET_ALTIVEC"  "vmsumuhm %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmsumshm"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 68))]  "TARGET_ALTIVEC"  "vmsumshm %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmsumuhs"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 69))   (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))]  "TARGET_ALTIVEC"  "vmsumuhs %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmsumshs"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 70))   (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))]  "TARGET_ALTIVEC"  "vmsumshs %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "umaxv16qi3"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (umax:V16QI (match_operand:V16QI 1 "register_operand" "v")                    (match_operand:V16QI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxub %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "smaxv16qi3"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (smax:V16QI (match_operand:V16QI 1 "register_operand" "v")                    (match_operand:V16QI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxsb %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "umaxv8hi3"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (umax:V8HI (match_operand:V8HI 1 "register_operand" "v")                   (match_operand:V8HI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxuh %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "smaxv8hi3"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (smax:V8HI (match_operand:V8HI 1 "register_operand" "v")                   (match_operand:V8HI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxsh %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "umaxv4si3"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (umax:V4SI (match_operand:V4SI 1 "register_operand" "v")                   (match_operand:V4SI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxuw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "smaxv4si3"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (smax:V4SI (match_operand:V4SI 1 "register_operand" "v")                   (match_operand:V4SI 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxsw %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "smaxv4sf3"  [(set (match_operand:V4SF 0 "register_operand" "=v")        (smax:V4SF (match_operand:V4SF 1 "register_operand" "v")                   (match_operand:V4SF 2 "register_operand" "v")))]  "TARGET_ALTIVEC"  "vmaxfp %0,%1,%2"  [(set_attr "type" "veccmp")])(define_insn "altivec_vmhaddshs"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V8HI 3 "register_operand" "v")] 71))   (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))]  "TARGET_ALTIVEC"  "vmhaddshs %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmhraddshs"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V8HI 3 "register_operand" "v")] 72))   (set (reg:SI 110) (unspec:SI [(const_int 0)] 213))]  "TARGET_ALTIVEC"  "vmhraddshs %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmladduhm"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")		      (match_operand:V8HI 2 "register_operand" "v")                      (match_operand:V8HI 3 "register_operand" "v")] 73))]  "TARGET_ALTIVEC"  "vmladduhm %0, %1, %2, %3"  [(set_attr "type" "veccomplex")])(define_insn "altivec_vmrghb"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "v")					   (parallel [(const_int 8)					   	      (const_int 9)					   	      (const_int 10)					   	      (const_int 11)					   	      (const_int 12)					   	      (const_int 13)						      (const_int 14)						      (const_int 15)					   	      (const_int 0)					   	      (const_int 1)					   	      (const_int 2)					   	      (const_int 3)					   	      (const_int 4)					   	      (const_int 5)					   	      (const_int 6)						      (const_int 7)]))                      (match_operand:V16QI 2 "register_operand" "v")		      (const_int 255)))]  "TARGET_ALTIVEC"  "vmrghb %0,%1,%2"  [(set_attr "type" "vecperm")])(define_insn "altivec_vmrghh"  [(set (match_operand:V8HI 0 "register_operand" "=v")        (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "v")					   (parallel [(const_int 4)					   	      (const_int 5)					   	      (const_int 6)					   	      (const_int 7)					   	      (const_int 0)					   	      (const_int 1)					   	      (const_int 2)					   	      (const_int 3)]))                      (match_operand:V8HI 2 "register_operand" "v")		      (const_int 15)))]  "TARGET_ALTIVEC"  "vmrghh %0,%1,%2"  [(set_attr "type" "vecperm")])(define_insn "altivec_vmrghw"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "v")					 (parallel [(const_int 2)					 	    (const_int 3)						    (const_int 0)						    (const_int 1)]))                      (match_operand:V4SI 2 "register_operand" "v")		      (const_int 12)))]  "TARGET_ALTIVEC"  "vmrghw %0,%1,%2"  [(set_attr "type" "vecperm")])(define_insn "altivec_vmrglb"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "v")					   (parallel [(const_int 0)					   	      (const_int 1)					   	      (const_int 2)					   	      (const_int 3)					   	      (const_int 4)					   	      (const_int 5)						      (const_int 6)						      (const_int 7)					   	      (const_int 8)					   	      (const_int 9)

⌨️ 快捷键说明

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