File: power_intrins.h

package info (click to toggle)
node-yarnpkg 4.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,752 kB
  • sloc: javascript: 38,953; ansic: 26,035; cpp: 7,247; sh: 2,829; makefile: 724; perl: 493
file content (34 lines) | stat: -rw-r--r-- 906 bytes parent folder | download
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
27
28
29
30
31
32
33
34
/* Helper functions to work around issues with clang builtins
 * Copyright (C) 2021 IBM Corporation
 *
 * Authors:
 *   Daniel Black <daniel@linux.vnet.ibm.com>
 *   Rogerio Alves <rogealve@br.ibm.com>
 *   Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
 *
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

#ifndef POWER_INTRINS_H
#define POWER_INTRINS_H

#if defined (__clang__)
/*
 * These stubs fix clang incompatibilities with GCC builtins.
 */

#ifndef __builtin_crypto_vpmsumw
#define __builtin_crypto_vpmsumw __builtin_crypto_vpmsumb
#endif
#ifndef __builtin_crypto_vpmsumd
#define __builtin_crypto_vpmsumd __builtin_crypto_vpmsumb
#endif

static inline __vector unsigned long long __attribute__((overloadable))
vec_ld(int __a, const __vector unsigned long long* __b) {
    return (__vector unsigned long long)__builtin_altivec_lvx(__a, __b);
}

#endif

#endif