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

📄 altivec.md

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")                      (match_operand:V4SI 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 	              UNSPEC_VSEL4SI))]  "TARGET_ALTIVEC"  "vsel %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsel_v4sf"  [(set (match_operand:V4SF 0 "register_operand" "=v")        (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")                      (match_operand:V4SI 3 "register_operand" "v")] 	              UNSPEC_VSEL4SF))]  "TARGET_ALTIVEC"  "vsel %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsel_v8hi"  [(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")] 	              UNSPEC_VSEL8HI))]  "TARGET_ALTIVEC"  "vsel %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsel_v16qi"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")                       (match_operand:V16QI 2 "register_operand" "v")                       (match_operand:V16QI 3 "register_operand" "v")] 	               UNSPEC_VSEL16QI))]  "TARGET_ALTIVEC"  "vsel %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsldoi_v4si"  [(set (match_operand:V4SI 0 "register_operand" "=v")        (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")		      (match_operand:V4SI 2 "register_operand" "v")                      (match_operand:QI 3 "immediate_operand" "i")] 163))]  "TARGET_ALTIVEC"  "vsldoi %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsldoi_v4sf"  [(set (match_operand:V4SF 0 "register_operand" "=v")        (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")		      (match_operand:V4SF 2 "register_operand" "v")                      (match_operand:QI 3 "immediate_operand" "i")] 164))]  "TARGET_ALTIVEC"  "vsldoi %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsldoi_v8hi"  [(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:QI 3 "immediate_operand" "i")] 165))]  "TARGET_ALTIVEC"  "vsldoi %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vsldoi_v16qi"  [(set (match_operand:V16QI 0 "register_operand" "=v")        (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")		       (match_operand:V16QI 2 "register_operand" "v")		       (match_operand:QI 3 "immediate_operand" "i")] 166))]  "TARGET_ALTIVEC"  "vsldoi %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupkhsb"  [(set (match_operand:V8HI 0 "register_operand" "=v")  	(unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 167))]  "TARGET_ALTIVEC"  "vupkhsb %0,%1"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupkhpx"  [(set (match_operand:V4SI 0 "register_operand" "=v")  	(unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 168))]  "TARGET_ALTIVEC"  "vupkhpx %0,%1"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupkhsh"  [(set (match_operand:V4SI 0 "register_operand" "=v")  	(unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 169))]  "TARGET_ALTIVEC"  "vupkhsh %0,%1"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupklsb"  [(set (match_operand:V8HI 0 "register_operand" "=v")  	(unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] 170))]  "TARGET_ALTIVEC"  "vupklsb %0,%1"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupklpx"  [(set (match_operand:V4SI 0 "register_operand" "=v")  	(unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 171))]  "TARGET_ALTIVEC"  "vupklpx %0,%1"  [(set_attr "type" "vecperm")])(define_insn "altivec_vupklsh"  [(set (match_operand:V4SI 0 "register_operand" "=v")  	(unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] 172))]  "TARGET_ALTIVEC"  "vupklsh %0,%1"  [(set_attr "type" "vecperm")]);; AltiVec predicates.(define_expand "cr6_test_for_zero"  [(set (match_operand:SI 0 "register_operand" "=r")	(eq:SI (reg:CC 74)	       (const_int 0)))]  "TARGET_ALTIVEC"  "")	(define_expand "cr6_test_for_zero_reverse"  [(set (match_operand:SI 0 "register_operand" "=r")	(eq:SI (reg:CC 74)	       (const_int 0)))   (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))]  "TARGET_ALTIVEC"  "")(define_expand "cr6_test_for_lt"  [(set (match_operand:SI 0 "register_operand" "=r")	(lt:SI (reg:CC 74)	       (const_int 0)))]  "TARGET_ALTIVEC"  "")(define_expand "cr6_test_for_lt_reverse"  [(set (match_operand:SI 0 "register_operand" "=r")	(lt:SI (reg:CC 74)	       (const_int 0)))   (set (match_dup 0) (minus:SI (const_int 1) (match_dup 0)))]  "TARGET_ALTIVEC"  "");; We can get away with generating the opcode on the fly (%3 below);; because all the predicates have the same scheduling parameters.(define_insn "altivec_predicate_v4sf"  [(set (reg:CC 74)	(unspec:CC [(match_operand:V4SF 1 "register_operand" "v")		    (match_operand:V4SF 2 "register_operand" "v")		    (match_operand 3 "any_operand" "")] 174))   (clobber (match_scratch:V4SF 0 "=v"))]  "TARGET_ALTIVEC"  "%3 %0,%1,%2"[(set_attr "type" "veccmp")])(define_insn "altivec_predicate_<mode>"  [(set (reg:CC 74)	(unspec:CC [(match_operand:VI 1 "register_operand" "v")		    (match_operand:VI 2 "register_operand" "v")		    (match_operand 3 "any_operand" "")] 173))   (clobber (match_scratch:VI 0 "=v"))]  "TARGET_ALTIVEC"  "%3 %0,%1,%2"[(set_attr "type" "veccmp")])(define_insn "altivec_mtvscr"  [(set (reg:SI 110)	(unspec_volatile:SI	 [(match_operand:V4SI 0 "register_operand" "v")] 186))]  "TARGET_ALTIVEC"  "mtvscr %0"  [(set_attr "type" "vecsimple")])(define_insn "altivec_mfvscr"  [(set (match_operand:V8HI 0 "register_operand" "=v")	(unspec_volatile:V8HI [(reg:SI 110)] 187))]  "TARGET_ALTIVEC"  "mfvscr %0"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dssall"  [(unspec_volatile [(const_int 0)] 188)]  "TARGET_ALTIVEC"  "dssall"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dss"  [(unspec_volatile [(match_operand:QI 0 "immediate_operand" "i")] 189)]  "TARGET_ALTIVEC"  "dss %0"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dst"  [(unspec [(match_operand 0 "register_operand" "b")	    (match_operand:SI 1 "register_operand" "r")	    (match_operand:QI 2 "immediate_operand" "i")] 190)]  "TARGET_ALTIVEC && GET_MODE (operands[0]) == Pmode"  "dst %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dstt"  [(unspec [(match_operand 0 "register_operand" "b")	    (match_operand:SI 1 "register_operand" "r")	    (match_operand:QI 2 "immediate_operand" "i")] 191)]  "TARGET_ALTIVEC && GET_MODE (operands[0]) == Pmode"  "dstt %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dstst"  [(unspec [(match_operand 0 "register_operand" "b")	    (match_operand:SI 1 "register_operand" "r")	    (match_operand:QI 2 "immediate_operand" "i")] 192)]  "TARGET_ALTIVEC && GET_MODE (operands[0]) == Pmode"  "dstst %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dststt"  [(unspec [(match_operand 0 "register_operand" "b")	    (match_operand:SI 1 "register_operand" "r")	    (match_operand:QI 2 "immediate_operand" "i")] 193)]  "TARGET_ALTIVEC && GET_MODE (operands[0]) == Pmode"  "dststt %0,%1,%2"  [(set_attr "type" "vecsimple")])(define_insn "altivec_lvsl"  [(set (match_operand:V16QI 0 "register_operand" "=v")	(unspec:V16QI [(match_operand 1 "memory_operand" "m")] 194))]  "TARGET_ALTIVEC"  "lvsl %0,%y1"  [(set_attr "type" "vecload")])(define_insn "altivec_lvsr"  [(set (match_operand:V16QI 0 "register_operand" "=v")	(unspec:V16QI [(match_operand 1 "memory_operand" "m")] 195))]  "TARGET_ALTIVEC"  "lvsr %0,%y1"  [(set_attr "type" "vecload")])(define_expand "build_vector_mask_for_load"  [(set (match_operand:V16QI 0 "register_operand" "=v")	(unspec:V16QI [(match_operand 1 "memory_operand" "m")] 195))]  "TARGET_ALTIVEC"  "{   rtx addr;  rtx temp;  if (GET_CODE (operands[1]) != MEM)    abort ();  addr = XEXP (operands[1], 0);  temp = gen_reg_rtx (GET_MODE (addr));  emit_insn (gen_rtx_SET (VOIDmode, temp, 			  gen_rtx_NEG (GET_MODE (addr), addr)));  emit_insn (gen_altivec_lvsr (operands[0], 			       gen_rtx_MEM (GET_MODE (operands[1]), temp)));  DONE;}");; Parallel some of the LVE* and STV*'s with unspecs because some have;; identical rtl but different instructions-- and gcc gets confused.(define_insn "altivec_lve<VI_char>x"  [(parallel    [(set (match_operand:VI 0 "register_operand" "=v")	  (match_operand:VI 1 "memory_operand" "m"))     (unspec [(const_int 0)] 196)])]  "TARGET_ALTIVEC"  "lve<VI_char>x %0,%y1"  [(set_attr "type" "vecload")])(define_insn "altivec_lvxl"  [(parallel    [(set (match_operand:V4SI 0 "register_operand" "=v")	  (match_operand:V4SI 1 "memory_operand" "m"))     (unspec [(const_int 0)] 213)])]  "TARGET_ALTIVEC"  "lvxl %0,%y1"  [(set_attr "type" "vecload")])(define_insn "altivec_lvx"  [(set (match_operand:V4SI 0 "register_operand" "=v")	(match_operand:V4SI 1 "memory_operand" "m"))]  "TARGET_ALTIVEC"  "lvx %0,%y1"  [(set_attr "type" "vecload")])(define_insn "altivec_stvx"  [(parallel    [(set (match_operand:V4SI 0 "memory_operand" "=m")	  (match_operand:V4SI 1 "register_operand" "v"))     (unspec [(const_int 0)] 201)])]  "TARGET_ALTIVEC"  "stvx %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "altivec_stvxl"  [(parallel    [(set (match_operand:V4SI 0 "memory_operand" "=m")	  (match_operand:V4SI 1 "register_operand" "v"))     (unspec [(const_int 0)] 202)])]  "TARGET_ALTIVEC"  "stvxl %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "altivec_stve<VI_char>x"  [(parallel    [(set (match_operand:VI 0 "memory_operand" "=m")	  (match_operand:VI 1 "register_operand" "v"))     (unspec [(const_int 0)] 203)])]  "TARGET_ALTIVEC"  "stve<VI_char>x %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "abs<mode>2"  [(set (match_operand:VI 0 "register_operand" "=v")	(abs:VI (match_operand:VI 1 "register_operand" "v")))   (clobber (match_scratch:VI 2 "=&v"))   (clobber (match_scratch:VI 3 "=&v"))]  "TARGET_ALTIVEC"  "vspltisb %2,0\;vsubu<VI_char>m %3,%2,%1\;vmaxs<VI_char> %0,%1,%3"  [(set_attr "type" "vecsimple")   (set_attr "length" "12")])(define_insn "absv4sf2"  [(set (match_operand:V4SF 0 "register_operand" "=v")        (abs:V4SF (match_operand:V4SF 1 "register_operand" "v")))   (clobber (match_scratch:V4SF 2 "=&v"))   (clobber (match_scratch:V4SF 3 "=&v"))]  "TARGET_ALTIVEC"  "vspltisw %2,-1\;vslw %3,%2,%2\;vandc %0,%1,%3"  [(set_attr "type" "vecsimple")   (set_attr "length" "12")])(define_insn "altivec_abss_<mode>"  [(set (match_operand:VI 0 "register_operand" "=v")        (unspec:VI [(match_operand:VI 1 "register_operand" "v")] 210))   (clobber (match_scratch:VI 2 "=&v"))   (clobber (match_scratch:VI 3 "=&v"))]  "TARGET_ALTIVEC"  "vspltisb %2,0\;vsubs<VI_char>s %3,%2,%1\;vmaxs<VI_char> %0,%1,%3"  [(set_attr "type" "vecsimple")   (set_attr "length" "12")])(define_insn "vec_realign_load_v4sf"  [(set (match_operand:V4SF 0 "register_operand" "=v")        (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")                      (match_operand:V4SF 2 "register_operand" "v")                      (match_operand:V16QI 3 "register_operand" "v")] 216))]  "TARGET_ALTIVEC"  "vperm %0,%1,%2,%3"  [(set_attr "type" "vecperm")])(define_insn "vec_realign_load_<mode>"  [(set (match_operand:VI 0 "register_operand" "=v")        (unspec:VI [(match_operand:VI 1 "register_operand" "v")                    (match_operand:VI 2 "register_operand" "v")                    (match_operand:V16QI 3 "register_operand" "v")] 215))]  "TARGET_ALTIVEC"  "vperm %0,%1,%2,%3"  [(set_attr "type" "vecperm")])

⌨️ 快捷键说明

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