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

📄 altivec.md

📁 linux下编程用 编译软件
💻 MD
📖 第 1 页 / 共 5 页
字号:
        (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_<mode>"  [(set (match_operand:V 0 "register_operand" "=v")        (unspec:V [(match_operand:V 1 "register_operand" "v")		   (match_operand:V 2 "register_operand" "v")                   (match_operand:QI 3 "immediate_operand" "i")]		  UNSPEC_VLSDOI))]  "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")]		     UNSPEC_VUPKHSB))]  "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")]		     UNSPEC_VUPKHPX))]  "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")]		     UNSPEC_VUPKHSH))]  "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")]		     UNSPEC_VUPKLSB))]  "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")]		     UNSPEC_VUPKLPX))]  "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")]		     UNSPEC_VUPKLSH))]  "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_<mode>"  [(set (reg:CC 74)	(unspec:CC [(match_operand:V 1 "register_operand" "v")		    (match_operand:V 2 "register_operand" "v")		    (match_operand 3 "any_operand" "")] UNSPEC_PREDICATE))   (clobber (match_scratch:V 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")] UNSPECV_MTVSCR))]  "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)] UNSPECV_MFVSCR))]  "TARGET_ALTIVEC"  "mfvscr %0"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dssall"  [(unspec_volatile [(const_int 0)] UNSPECV_DSSALL)]  "TARGET_ALTIVEC"  "dssall"  [(set_attr "type" "vecsimple")])(define_insn "altivec_dss"  [(unspec_volatile [(match_operand:QI 0 "immediate_operand" "i")]		    UNSPECV_DSS)]  "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")] UNSPEC_DST)]  "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")] UNSPEC_DSTT)]  "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")] UNSPEC_DSTST)]  "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")] UNSPEC_DSTSTT)]  "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" "Z")] UNSPEC_LVSL))]  "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" "Z")] UNSPEC_LVSR))]  "TARGET_ALTIVEC"  "lvsr %0,%y1"  [(set_attr "type" "vecload")])(define_expand "build_vector_mask_for_load"  [(set (match_operand:V16QI 0 "register_operand" "")	(unspec:V16QI [(match_operand 1 "memory_operand" "")] UNSPEC_LVSR))]  "TARGET_ALTIVEC"  "{   rtx addr;  rtx temp;  gcc_assert (GET_CODE (operands[1]) == MEM);  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], 			       replace_equiv_address (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" "Z"))     (unspec [(const_int 0)] UNSPEC_LVE)])]  "TARGET_ALTIVEC"  "lve<VI_char>x %0,%y1"  [(set_attr "type" "vecload")])(define_insn "*altivec_lvesfx"  [(parallel    [(set (match_operand:V4SF 0 "register_operand" "=v")	  (match_operand:V4SF 1 "memory_operand" "Z"))     (unspec [(const_int 0)] UNSPEC_LVE)])]  "TARGET_ALTIVEC"  "lvewx %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" "Z"))     (unspec [(const_int 0)] UNSPEC_SET_VSCR)])]  "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" "Z"))]  "TARGET_ALTIVEC"  "lvx %0,%y1"  [(set_attr "type" "vecload")])(define_insn "altivec_stvx"  [(parallel    [(set (match_operand:V4SI 0 "memory_operand" "=Z")	  (match_operand:V4SI 1 "register_operand" "v"))     (unspec [(const_int 0)] UNSPEC_STVX)])]  "TARGET_ALTIVEC"  "stvx %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "altivec_stvxl"  [(parallel    [(set (match_operand:V4SI 0 "memory_operand" "=Z")	  (match_operand:V4SI 1 "register_operand" "v"))     (unspec [(const_int 0)] UNSPEC_STVXL)])]  "TARGET_ALTIVEC"  "stvxl %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "altivec_stve<VI_char>x"  [(parallel    [(set (match_operand:VI 0 "memory_operand" "=Z")	  (match_operand:VI 1 "register_operand" "v"))     (unspec [(const_int 0)] UNSPEC_STVE)])]  "TARGET_ALTIVEC"  "stve<VI_char>x %1,%y0"  [(set_attr "type" "vecstore")])(define_insn "*altivec_stvesfx"  [(parallel    [(set (match_operand:V4SF 0 "memory_operand" "=Z")	  (match_operand:V4SF 1 "register_operand" "v"))     (unspec [(const_int 0)] UNSPEC_STVE)])]  "TARGET_ALTIVEC"  "stvewx %1,%y0"  [(set_attr "type" "vecstore")])(define_expand "vec_init<mode>"  [(match_operand:V 0 "register_operand" "")   (match_operand 1 "" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_init (operands[0], operands[1]);  DONE;})(define_expand "vec_setv4si"  [(match_operand:V4SI 0 "register_operand" "")   (match_operand:SI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_set (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_setv8hi"  [(match_operand:V8HI 0 "register_operand" "")   (match_operand:HI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_set (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_setv16qi"  [(match_operand:V16QI 0 "register_operand" "")   (match_operand:QI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_set (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_setv4sf"  [(match_operand:V4SF 0 "register_operand" "")   (match_operand:SF 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_set (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_extractv4si"  [(match_operand:SI 0 "register_operand" "")   (match_operand:V4SI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_extract (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_extractv8hi"  [(match_operand:HI 0 "register_operand" "")   (match_operand:V8HI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_extract (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_extractv16qi"  [(match_operand:QI 0 "register_operand" "")   (match_operand:V16QI 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_extract (operands[0], operands[1], INTVAL (operands[2]));  DONE;})(define_expand "vec_extractv4sf"  [(match_operand:SF 0 "register_operand" "")   (match_operand:V4SF 1 "register_operand" "")   (match_operand 2 "const_int_operand" "")]  "TARGET_ALTIVEC"{  rs6000_expand_vector_extract (operands[0], operands[1], INTVAL (operands[2]));  DONE;});; Generate;;    vspltis? SCRATCH0,0;;    vsubu?m SCRATCH2,SCRATCH1,%1;;    vmaxs? %0,%1,SCRATCH2"(define_expand "abs<mode>2"  [(set (match_dup 2) (vec_duplicate:VI (const_int 0)))   (set

⌨️ 快捷键说明

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