Using the GNU Compiler Collection (GCC): PowerPC AltiVec Built-in Functions Available on ISA 2.07

Next: PowerPC AltiVec Built-in Functions Available on ISA 3.0, Previous: PowerPC AltiVec Built-in Functions Available on ISA 2.06, Up: PowerPC AltiVec/VSX Built-in Functions [Contents][Index]

#### 6.60.23.3 PowerPC AltiVec Built-in Functions Available on ISA 2.07

If the ISA 2.07 additions to the vector/scalar (power8-vector) instruction set are available, the following additional functions are available for both 32-bit and 64-bit targets. For 64-bit targets, you can use vector long instead of vector long long, vector bool long instead of vector bool long long, and vector unsigned long instead of vector unsigned long long.

Only functions excluded from the PVIPR are listed here.

    vector long long vec_vaddudm (vector long long, vector long long);
    vector long long vec_vaddudm (vector bool long long, vector long long);
    vector long long vec_vaddudm (vector long long, vector bool long long);
    vector unsigned long long vec_vaddudm (vector unsigned long long,
                                           vector unsigned long long);
    vector unsigned long long vec_vaddudm (vector bool unsigned long long,
                                           vector unsigned long long);
    vector unsigned long long vec_vaddudm (vector unsigned long long,
                                           vector bool unsigned long long);

    vector long long vec_vclz (vector long long);
    vector unsigned long long vec_vclz (vector unsigned long long);
    vector int vec_vclz (vector int);
    vector unsigned int vec_vclz (vector int);
    vector short vec_vclz (vector short);
    vector unsigned short vec_vclz (vector unsigned short);
    vector signed char vec_vclz (vector signed char);
    vector unsigned char vec_vclz (vector unsigned char);

    vector signed char vec_vclzb (vector signed char);
    vector unsigned char vec_vclzb (vector unsigned char);

    vector long long vec_vclzd (vector long long);
    vector unsigned long long vec_vclzd (vector unsigned long long);

    vector short vec_vclzh (vector short);
    vector unsigned short vec_vclzh (vector unsigned short);

    vector int vec_vclzw (vector int);
    vector unsigned int vec_vclzw (vector int);

    vector signed char vec_vgbbd (vector signed char);
    vector unsigned char vec_vgbbd (vector unsigned char);

    vector long long vec_vmaxsd (vector long long, vector long long);

    vector unsigned long long vec_vmaxud (vector unsigned long long,
                                          unsigned vector long long);

    vector long long vec_vminsd (vector long long, vector long long);

    vector unsigned long long vec_vminud (vector long long, vector long long);

    vector int vec_vpksdss (vector long long, vector long long);
    vector unsigned int vec_vpksdss (vector long long, vector long long);

    vector unsigned int vec_vpkudus (vector unsigned long long,
                                     vector unsigned long long);

    vector int vec_vpkudum (vector long long, vector long long);
    vector unsigned int vec_vpkudum (vector unsigned long long,
                                     vector unsigned long long);
    vector bool int vec_vpkudum (vector bool long long, vector bool long long);

    vector long long vec_vpopcnt (vector long long);
    vector unsigned long long vec_vpopcnt (vector unsigned long long);
    vector int vec_vpopcnt (vector int);
    vector unsigned int vec_vpopcnt (vector int);
    vector short vec_vpopcnt (vector short);
    vector unsigned short vec_vpopcnt (vector unsigned short);
    vector signed char vec_vpopcnt (vector signed char);
    vector unsigned char vec_vpopcnt (vector unsigned char);

    vector signed char vec_vpopcntb (vector signed char);
    vector unsigned char vec_vpopcntb (vector unsigned char);

    vector long long vec_vpopcntd (vector long long);
    vector unsigned long long vec_vpopcntd (vector unsigned long long);

    vector short vec_vpopcnth (vector short);
    vector unsigned short vec_vpopcnth (vector unsigned short);

    vector int vec_vpopcntw (vector int);
    vector unsigned int vec_vpopcntw (vector int);

    vector long long vec_vrld (vector long long, vector unsigned long long);
    vector unsigned long long vec_vrld (vector unsigned long long,
                                        vector unsigned long long);

    vector long long vec_vsld (vector long long, vector unsigned long long);
    vector long long vec_vsld (vector unsigned long long,
                               vector unsigned long long);

    vector long long vec_vsrad (vector long long, vector unsigned long long);
    vector unsigned long long vec_vsrad (vector unsigned long long,
                                         vector unsigned long long);

    vector long long vec_vsrd (vector long long, vector unsigned long long);
    vector unsigned long long char vec_vsrd (vector unsigned long long,
                                             vector unsigned long long);

    vector long long vec_vsubudm (vector long long, vector long long);
    vector long long vec_vsubudm (vector bool long long, vector long long);
    vector long long vec_vsubudm (vector long long, vector bool long long);
    vector unsigned long long vec_vsubudm (vector unsigned long long,
                                           vector unsigned long long);
    vector unsigned long long vec_vsubudm (vector bool long long,
                                           vector unsigned long long);
    vector unsigned long long vec_vsubudm (vector unsigned long long,
                                           vector bool long long);

    vector long long vec_vupkhsw (vector int);
    vector unsigned long long vec_vupkhsw (vector unsigned int);

    vector long long vec_vupklsw (vector int);
    vector unsigned long long vec_vupklsw (vector int);

If the ISA 2.07 additions to the vector/scalar (power8-vector) instruction set are available, the following additional functions are available for 64-bit targets. New vector types (vector __int128 and vector __uint128) are available to hold the __int128 and __uint128 types to use these builtins.

The normal vector extract, and set operations work on vector __int128 and vector __uint128 types, but the index value must be 0.

Only functions excluded from the PVIPR are listed here.

    vector __int128 vec_vaddcuq (vector __int128, vector __int128);
    vector __uint128 vec_vaddcuq (vector __uint128, vector __uint128);

    vector __int128 vec_vadduqm (vector __int128, vector __int128);
    vector __uint128 vec_vadduqm (vector __uint128, vector __uint128);

    vector __int128 vec_vaddecuq (vector __int128, vector __int128,
                                    vector __int128);
    vector __uint128 vec_vaddecuq (vector __uint128, vector __uint128,
                                     vector __uint128);

    vector __int128 vec_vaddeuqm (vector __int128, vector __int128,
                                    vector __int128);
    vector __uint128 vec_vaddeuqm (vector __uint128, vector __uint128,
                                     vector __uint128);

    vector __int128 vec_vsubecuq (vector __int128, vector __int128,
                                    vector __int128);
    vector __uint128 vec_vsubecuq (vector __uint128, vector __uint128,
                                     vector __uint128);

    vector __int128 vec_vsubeuqm (vector __int128, vector __int128,
                                    vector __int128);
    vector __uint128 vec_vsubeuqm (vector __uint128, vector __uint128,
                                     vector __uint128);

    vector __int128 vec_vsubcuq (vector __int128, vector __int128);
    vector __uint128 vec_vsubcuq (vector __uint128, vector __uint128);

    __int128 vec_vsubuqm (__int128, __int128);
    __uint128 vec_vsubuqm (__uint128, __uint128);

    vector __int128 __builtin_bcdadd (vector __int128, vector __int128, const int);
    vector unsigned char __builtin_bcdadd (vector unsigned char, vector unsigned char,
                                           const int);
    int __builtin_bcdadd_lt (vector __int128, vector __int128, const int);
    int __builtin_bcdadd_lt (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdadd_eq (vector __int128, vector __int128, const int);
    int __builtin_bcdadd_eq (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdadd_gt (vector __int128, vector __int128, const int);
    int __builtin_bcdadd_gt (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdadd_ov (vector __int128, vector __int128, const int);
    int __builtin_bcdadd_ov (vector unsigned char, vector unsigned char, const int);

    vector __int128 __builtin_bcdsub (vector __int128, vector __int128, const int);
    vector unsigned char __builtin_bcdsub (vector unsigned char, vector unsigned char,
                                           const int);
    int __builtin_bcdsub_lt (vector __int128, vector __int128, const int);
    int __builtin_bcdsub_lt (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdsub_eq (vector __int128, vector __int128, const int);
    int __builtin_bcdsub_eq (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdsub_gt (vector __int128, vector __int128, const int);
    int __builtin_bcdsub_gt (vector unsigned char, vector unsigned char, const int);
    int __builtin_bcdsub_ov (vector __int128, vector __int128, const int);
    int __builtin_bcdsub_ov (vector unsigned char, vector unsigned char, const int);

Next: PowerPC AltiVec Built-in Functions Available on ISA 3.0, Previous: PowerPC AltiVec Built-in Functions Available on ISA 2.06, Up: PowerPC AltiVec/VSX Built-in Functions [Contents][Index]