📄 sse.md
字号:
[(set (match_operand:V4SF 0 "register_operand" "") (ior:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "") (match_operand:V4SF 2 "nonimmediate_operand" "")))] "TARGET_SSE" "ix86_fixup_binary_operands_no_copy (IOR, V4SFmode, operands);")(define_insn "*iorv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") (ior:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "%0") (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE && ix86_binary_operator_ok (IOR, V4SFmode, operands)" "orps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_expand "xorv4sf3" [(set (match_operand:V4SF 0 "register_operand" "") (xor:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "") (match_operand:V4SF 2 "nonimmediate_operand" "")))] "TARGET_SSE" "ix86_fixup_binary_operands_no_copy (XOR, V4SFmode, operands);")(define_insn "*xorv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") (xor:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "%0") (match_operand:V4SF 2 "nonimmediate_operand" "xm")))] "TARGET_SSE && ix86_binary_operator_ok (XOR, V4SFmode, operands)" "xorps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")]);; APPLE LOCAL begin mainline April 14, 2005 Radar 4053179;; Also define scalar versions. These are used for abs, neg, and;; conditional move. Using subregs into vector modes causes regiser;; allocation lossage. These patterns do not allow memory operands;; because the native instructions read the full 128-bits.(define_insn "*andsf3" [(set (match_operand:SF 0 "register_operand" "=x") (and:SF (match_operand:SF 1 "register_operand" "0") (match_operand:SF 2 "register_operand" "x")))] "TARGET_SSE" "andps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_insn "*nandsf3" [(set (match_operand:SF 0 "register_operand" "=x") (and:SF (not:SF (match_operand:SF 1 "register_operand" "0")) (match_operand:SF 2 "register_operand" "x")))] "TARGET_SSE" "andnps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_insn "*iorsf3" [(set (match_operand:SF 0 "register_operand" "=x") (ior:SF (match_operand:SF 1 "register_operand" "0") (match_operand:SF 2 "register_operand" "x")))] "TARGET_SSE" "orps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_insn "*xorsf3" [(set (match_operand:SF 0 "register_operand" "=x") (xor:SF (match_operand:SF 1 "register_operand" "0") (match_operand:SF 2 "register_operand" "x")))] "TARGET_SSE" "xorps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")]);; APPLE LOCAL end mainline April 14, 2005 Radar 4053179;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Parallel single-precision floating point conversion operations;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(define_insn "sse_cvtpi2ps" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_merge:V4SF (vec_duplicate:V4SF (float:V2SF (match_operand:V2SI 2 "nonimmediate_operand" "ym"))) (match_operand:V4SF 1 "register_operand" "0") (const_int 3)))] "TARGET_SSE" "cvtpi2ps\t{%2, %0|%0, %2}" [(set_attr "type" "ssecvt") (set_attr "mode" "V4SF")])(define_insn "sse_cvtps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_select:V2SI (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] UNSPEC_FIX_NOTRUNC) (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvtps2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set_attr "mode" "DI")])(define_insn "sse_cvttps2pi" [(set (match_operand:V2SI 0 "register_operand" "=y") (vec_select:V2SI (fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "xm")) (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "cvttps2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set_attr "mode" "SF")])(define_insn "sse_cvtsi2ss" [(set (match_operand:V4SF 0 "register_operand" "=x,x") (vec_merge:V4SF (vec_duplicate:V4SF (float:SF (match_operand:SI 2 "nonimmediate_operand" "r,m"))) (match_operand:V4SF 1 "register_operand" "0,0") (const_int 1)))] "TARGET_SSE" "cvtsi2ss\t{%2, %0|%0, %2}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "vector,double") (set_attr "mode" "SF")])(define_insn "sse_cvtsi2ssq" [(set (match_operand:V4SF 0 "register_operand" "=x,x") (vec_merge:V4SF (vec_duplicate:V4SF (float:SF (match_operand:DI 2 "nonimmediate_operand" "r,rm"))) (match_operand:V4SF 1 "register_operand" "0,0") (const_int 1)))] "TARGET_SSE && TARGET_64BIT" "cvtsi2ssq\t{%2, %0|%0, %2}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "vector,double") (set_attr "mode" "SF")])(define_insn "sse_cvtss2si" [(set (match_operand:SI 0 "register_operand" "=r,r") (unspec:SI [(vec_select:SF (match_operand:V4SF 1 "nonimmediate_operand" "x,m") (parallel [(const_int 0)]))] UNSPEC_FIX_NOTRUNC))] "TARGET_SSE" "cvtss2si\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "mode" "SI")])(define_insn "sse_cvtss2siq" [(set (match_operand:DI 0 "register_operand" "=r,r") (unspec:DI [(vec_select:SF (match_operand:V4SF 1 "nonimmediate_operand" "x,m") (parallel [(const_int 0)]))] UNSPEC_FIX_NOTRUNC))] "TARGET_SSE && TARGET_64BIT" "cvtss2siq\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "mode" "DI")])(define_insn "sse_cvttss2si" [(set (match_operand:SI 0 "register_operand" "=r,r") (fix:SI (vec_select:SF (match_operand:V4SF 1 "nonimmediate_operand" "x,m") (parallel [(const_int 0)]))))] "TARGET_SSE" "cvttss2si\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "mode" "SI")])(define_insn "sse_cvttss2siq" [(set (match_operand:DI 0 "register_operand" "=r,r") (fix:DI (vec_select:SF (match_operand:V4SF 1 "nonimmediate_operand" "x,m") (parallel [(const_int 0)]))))] "TARGET_SSE && TARGET_64BIT" "cvttss2siq\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "mode" "DI")])(define_insn "sse2_cvtdq2ps" [(set (match_operand:V4SF 0 "register_operand" "=x") (float:V4SF (match_operand:V4SI 1 "nonimmediate_operand" "xm")))] "TARGET_SSE2" "cvtdq2ps\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set_attr "mode" "V2DF")])(define_insn "sse2_cvtps2dq" [(set (match_operand:V4SI 0 "register_operand" "=x") (unspec:V4SI [(match_operand:V4SF 1 "nonimmediate_operand" "xm")] UNSPEC_FIX_NOTRUNC))] "TARGET_SSE2" "cvtps2dq\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set_attr "mode" "TI")])(define_insn "sse2_cvttps2dq" [(set (match_operand:V4SI 0 "register_operand" "=x") (fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "xm")))] "TARGET_SSE2" "cvttps2dq\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set_attr "mode" "TI")]);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Parallel single-precision floating point element swizzling;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; APPLE LOCAL begin 4332318(define_insn "sse_movhlps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,m") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "nonimmediate_operand" " 0,0,0") (match_operand:V4SF 2 "nonimmediate_operand" " x,o,x")) (parallel [(const_int 6) (const_int 7) (const_int 2) (const_int 3)])))] "TARGET_SSE && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ movhlps\t{%2, %0|%0, %2} movlps\t{%H2, %0|%0, %H2} movhps\t{%2, %0|%0, %2}" [(set_attr "type" "ssemov") (set_attr "mode" "V4SF,V2SF,V2SF")]);; APPLE LOCAL end 4332318; APPLE LOCAL begin radar 4099352(define_insn "sse_movlhps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,x,o") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "nonimmediate_operand" " 0,0,0,0") /* APPLE LOCAL mainline candidate 4283414 */ (match_operand:V4SF 2 "nonimmediate_or_0_operand" " C,x,m,x")) (parallel [(const_int 0) (const_int 1) (const_int 4) (const_int 5)])))] "TARGET_SSE && ix86_binary_operator_ok (UNKNOWN, V4SFmode, operands)" "@ xorps\t%0, %0 movlhps\t{%2, %0|%0, %2} movhps\t{%2, %0|%0, %2} movlps\t{%2, %H0|%H0, %2}" [(set_attr "type" "ssemov") (set_attr "mode" "V4SF,V4SF,V2SF,V2SF")]); APPLE LOCAL end radar 4099352(define_insn "sse_unpckhps" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "nonimmediate_operand" "xm")) (parallel [(const_int 2) (const_int 6) (const_int 3) (const_int 7)])))] "TARGET_SSE" "unpckhps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_insn "sse_unpcklps" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "nonimmediate_operand" "xm")) (parallel [(const_int 0) (const_int 4) (const_int 1) (const_int 5)])))] "TARGET_SSE" "unpcklps\t{%2, %0|%0, %2}" [(set_attr "type" "sselog") (set_attr "mode" "V4SF")]);; These are modeled with the same vec_concat as the others so that we;; capture users of shufps that can use the new instructions(define_insn "sse3_movshdup" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "nonimmediate_operand" "xm") (match_dup 1)) (parallel [(const_int 1) (const_int 1) (const_int 7) (const_int 7)])))] "TARGET_SSE3" "movshdup\t{%1, %0|%0, %1}" [(set_attr "type" "sse") (set_attr "mode" "V4SF")])(define_insn "sse3_movsldup" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "nonimmediate_operand" "xm") (match_dup 1)) (parallel [(const_int 0) (const_int 0) (const_int 6) (const_int 6)])))] "TARGET_SSE3" "movsldup\t{%1, %0|%0, %1}" [(set_attr "type" "sse") (set_attr "mode" "V4SF")])(define_expand "sse_shufps" [(match_operand:V4SF 0 "register_operand" "") (match_operand:V4SF 1 "register_operand" "") (match_operand:V4SF 2 "nonimmediate_operand" "") (match_operand:SI 3 "const_int_operand" "")] "TARGET_SSE"{ int mask = INTVAL (operands[3]); emit_insn (gen_sse_shufps_1 (operands[0], operands[1], operands[2], GEN_INT ((mask >> 0) & 3), GEN_INT ((mask >> 2) & 3), GEN_INT (((mask >> 4) & 3) + 4), GEN_INT (((mask >> 6) & 3) + 4))); DONE;})(define_insn "sse_shufps_1" [(set (match_operand:V4SF 0 "register_operand" "=x") (vec_select:V4SF (vec_concat:V8SF (match_operand:V4SF 1 "register_operand" "0") (match_operand:V4SF 2 "nonimmediate_operand" "xm")) (parallel [(match_operand 3 "const_0_to_3_operand" "") (match_operand 4 "const_0_to_3_operand" "") (match_operand 5 "const_4_to_7_operand" "") (match_operand 6 "const_4_to_7_operand" "")])))] "TARGET_SSE"{ int mask = 0; mask |= INTVAL (operands[3]) << 0; mask |= INTVAL (operands[4]) << 2; mask |= (INTVAL (operands[5]) - 4) << 4; mask |= (INTVAL (operands[6]) - 4) << 6; operands[3] = GEN_INT (mask); return "shufps\t{%3, %2, %0|%0, %2, %3}";} [(set_attr "type" "sselog") (set_attr "mode" "V4SF")])(define_insn "sse_storehps" [(set (match_operand:V2SF 0 "nonimmediate_operand" "=m,x,x") (vec_select:V2SF (match_operand:V4SF 1 "nonimmediate_operand" "x,x,o") (parallel [(const_int 2) (const_int 3)])))] "TARGET_SSE" "@ movhps\t{%1, %0|%0, %1} movhlps\t{%1, %0|%0, %1} movlps\t{%H1, %0|%0, %H1}" [(set_attr "type" "ssemov") (set_attr "mode" "V2SF,V4SF,V2SF")])(define_insn "sse_loadhps" [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,o") (vec_concat:V4SF (vec_select:V2SF (match_operand:V4SF 1 "nonimmediate_operand" "0,0,0") (parallel [(const_int 0) (const_int 1)])) (match_operand:V2SF 2 "nonimmediate_operand" "m,x,x")))] "TARGET_SSE" "@ movhps\t{%2, %0|%0, %2} movlhps\t{%2, %0|%0, %2} movlps\t{%2, %H0|%H0, %2}" [(set_attr "type" "ssemov") (set_attr "mode" "V2SF,V4SF,V2SF")])(define_insn "sse_storelps" [(set (match_operand:V2SF 0 "nonimmediate_operand" "=m,x,x") (vec_select:V2SF (match_operand:V4SF 1 "nonimmediate_operand" "x,x,m") (parallel [(const_int 0) (const_int 1)])))] "TARGET_SSE" "@ movlps\t{%1, %0|%0, %1} movaps\t{%1, %0|%0, %1} movlps\t{%1, %0|%0, %1}" [(set_attr "type" "ssemov")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -