File: test_ppc_aes.cpp

package info (click to toggle)
libcrypto%2B%2B 8.9.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,960 kB
  • sloc: cpp: 110,116; asm: 10,493; sh: 8,937; makefile: 55
file content (26 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
    __vector unsigned char x = {1,2,3,4,5,6,7,8};
    x=__vcipher(x,x);
    x=__vcipherlast(x,x);
    x=__vncipher(x,x);
    x=__vncipherlast(x,x);
#elif defined(__clang__)
    __vector unsigned long long x = {1,2};
    x=__builtin_altivec_crypto_vcipher(x,x);
    x=__builtin_altivec_crypto_vcipherlast(x,x);
    x=__builtin_altivec_crypto_vncipher(x,x);
    x=__builtin_altivec_crypto_vncipherlast(x,x);
#elif defined(__GNUC__)
    __vector unsigned long long x = {1,2};
    x=__builtin_crypto_vcipher(x,x);
    x=__builtin_crypto_vcipherlast(x,x);
    x=__builtin_crypto_vncipher(x,x);
    x=__builtin_crypto_vncipherlast(x,x);
#else
    int XXX[-1];
#endif
    return 0;
}