diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rs6000/altivec.h | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/altivec.md | 20 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-builtin.def | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-call.c | 2 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h index e1e75ad0f1e..12dfcd8d2bf 100644 --- a/gcc/config/rs6000/altivec.h +++ b/gcc/config/rs6000/altivec.h @@ -691,6 +691,9 @@ __altivec_scalar_pred(vec_any_nle, with support for different vector argument and result types. */ #define vec_clzm(a, b) __builtin_altivec_vclzdm (a, b) #define vec_ctzm(a, b) __builtin_altivec_vctzdm (a, b) +#define vec_pdep(a, b) __builtin_altivec_vpdepd (a, b) +#define vec_pext(a, b) __builtin_altivec_vpextd (a, b) + #endif #endif /* _ALTIVEC_H */ diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index 5ef4889ba55..33ba57855bc 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -162,6 +162,8 @@ UNSPEC_VRLNM UNSPEC_VCLZDM UNSPEC_VCTZDM + UNSPEC_VPDEPD + UNSPEC_VPEXTD ]) (define_c_enum "unspecv" @@ -4116,6 +4118,24 @@ "vctzdm %0,%1,%2" [(set_attr "type" "vecsimple")]) +(define_insn "vpdepd" + [(set (match_operand:V2DI 0 "altivec_register_operand" "=v") + (unspec:V2DI [(match_operand:V2DI 1 "altivec_register_operand" "v") + (match_operand:V2DI 2 "altivec_register_operand" "v")] + UNSPEC_VPDEPD))] + "TARGET_FUTURE" + "vpdepd %0,%1,%2" + [(set_attr "type" "vecsimple")]) + +(define_insn "vpextd" + [(set (match_operand:V2DI 0 "altivec_register_operand" "=v") + (unspec:V2DI [(match_operand:V2DI 1 "altivec_register_operand" "v") + (match_operand:V2DI 2 "altivec_register_operand" "v")] + UNSPEC_VPEXTD))] + "TARGET_FUTURE" + "vpextd %0,%1,%2" + [(set_attr "type" "vecsimple")]) + (define_expand "bcd<bcd_add_sub>_<code>" [(parallel [(set (reg:CCFP CR6_REGNO) diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def index 9293e7cf4fb..776fc542ebf 100644 --- a/gcc/config/rs6000/rs6000-builtin.def +++ b/gcc/config/rs6000/rs6000-builtin.def @@ -2518,6 +2518,8 @@ BU_P9_OVERLOAD_2 (CMPEQB, "byte_in_set") /* Future architecture vector built-ins. */ BU_FUTURE_V_2 (VCLZDM, "vclzdm", CONST, vclzdm) BU_FUTURE_V_2 (VCTZDM, "vctzdm", CONST, vctzdm) +BU_FUTURE_V_2 (VPDEPD, "vpdepd", CONST, vpdepd) +BU_FUTURE_V_2 (VPEXTD, "vpextd", CONST, vpextd) /* 1 argument crypto functions. */ BU_CRYPTO_1 (VSBOX, "vsbox", CONST, crypto_vsbox_v2di) diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index 2a4ce5bd340..ab6ba576605 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -12928,6 +12928,8 @@ builtin_function_type (machine_mode mode_ret, machine_mode mode_arg0, case P8V_BUILTIN_ORC_V1TI_UNS: case FUTURE_BUILTIN_VCLZDM: case FUTURE_BUILTIN_VCTZDM: + case FUTURE_BUILTIN_VPDEPD: + case FUTURE_BUILTIN_VPEXTD: h.uns_p[0] = 1; h.uns_p[1] = 1; h.uns_p[2] = 1; |