source: Daodan/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.0/include/vaesintrin.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.4 KB
Line 
1/* Copyright (C) 2017-2021 Free Software Foundation, Inc.
2
3 This file is part of GCC.
4
5 GCC is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GCC is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 Under Section 7 of GPL version 3, you are granted additional
16 permissions described in the GCC Runtime Library Exception, version
17 3.1, as published by the Free Software Foundation.
18
19 You should have received a copy of the GNU General Public License and
20 a copy of the GCC Runtime Library Exception along with this program;
21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 <http://www.gnu.org/licenses/>. */
23
24#ifndef __VAESINTRIN_H_INCLUDED
25#define __VAESINTRIN_H_INCLUDED
26
27#if !defined(__VAES__) || !defined(__AVX__)
28#pragma GCC push_options
29#pragma GCC target("vaes,avx")
30#define __DISABLE_VAES__
31#endif /* __VAES__ */
32
33extern __inline __m256i
34__attribute__((__gnu_inline__, __always_inline__, __artificial__))
35_mm256_aesdec_epi128 (__m256i __A, __m256i __B)
36{
37 return (__m256i)__builtin_ia32_vaesdec_v32qi ((__v32qi) __A, (__v32qi) __B);
38}
39
40extern __inline __m256i
41__attribute__((__gnu_inline__, __always_inline__, __artificial__))
42_mm256_aesdeclast_epi128 (__m256i __A, __m256i __B)
43{
44 return (__m256i)__builtin_ia32_vaesdeclast_v32qi ((__v32qi) __A,
45 (__v32qi) __B);
46}
47
48extern __inline __m256i
49__attribute__((__gnu_inline__, __always_inline__, __artificial__))
50_mm256_aesenc_epi128 (__m256i __A, __m256i __B)
51{
52 return (__m256i)__builtin_ia32_vaesenc_v32qi ((__v32qi) __A, (__v32qi) __B);
53}
54
55extern __inline __m256i
56__attribute__((__gnu_inline__, __always_inline__, __artificial__))
57_mm256_aesenclast_epi128 (__m256i __A, __m256i __B)
58{
59 return (__m256i)__builtin_ia32_vaesenclast_v32qi ((__v32qi) __A,
60 (__v32qi) __B);
61}
62
63#ifdef __DISABLE_VAES__
64#undef __DISABLE_VAES__
65#pragma GCC pop_options
66#endif /* __DISABLE_VAES__ */
67
68
69#if !defined(__VAES__) || !defined(__AVX512F__)
70#pragma GCC push_options
71#pragma GCC target("vaes,avx512f")
72#define __DISABLE_VAESF__
73#endif /* __VAES__ */
74
75
76extern __inline __m512i
77__attribute__((__gnu_inline__, __always_inline__, __artificial__))
78_mm512_aesdec_epi128 (__m512i __A, __m512i __B)
79{
80 return (__m512i)__builtin_ia32_vaesdec_v64qi ((__v64qi) __A, (__v64qi) __B);
81}
82
83extern __inline __m512i
84__attribute__((__gnu_inline__, __always_inline__, __artificial__))
85_mm512_aesdeclast_epi128 (__m512i __A, __m512i __B)
86{
87 return (__m512i)__builtin_ia32_vaesdeclast_v64qi ((__v64qi) __A,
88 (__v64qi) __B);
89}
90
91extern __inline __m512i
92__attribute__((__gnu_inline__, __always_inline__, __artificial__))
93_mm512_aesenc_epi128 (__m512i __A, __m512i __B)
94{
95 return (__m512i)__builtin_ia32_vaesenc_v64qi ((__v64qi) __A, (__v64qi) __B);
96}
97
98extern __inline __m512i
99__attribute__((__gnu_inline__, __always_inline__, __artificial__))
100_mm512_aesenclast_epi128 (__m512i __A, __m512i __B)
101{
102 return (__m512i)__builtin_ia32_vaesenclast_v64qi ((__v64qi) __A,
103 (__v64qi) __B);
104}
105
106#ifdef __DISABLE_VAESF__
107#undef __DISABLE_VAESF__
108#pragma GCC pop_options
109#endif /* __DISABLE_VAES__ */
110
111#endif /* __VAESINTRIN_H_INCLUDED */
Note: See TracBrowser for help on using the repository browser.