Debian Codegraph @

gcc/config/i386/amxtf32intrin.h

raw
1 /* Copyright (C) 2024-2025 Free Software Foundation, Inc.
2 This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3, or (at your option)
6 any later version.
7 GCC is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11 Under Section 7 of GPL version 3, you are granted additional
12 permissions described in the GCC Runtime Library Exception, version
13 3.1, as published by the Free Software Foundation.
14 You should have received a copy of the GNU General Public License and
15 a copy of the GCC Runtime Library Exception along with this program;
16 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
17 <http://www.gnu.org/licenses/>. */
18
19 #if !defined _IMMINTRIN_H_INCLUDED
20 #error "Never use <amxtf32intrin.h> directly; include <immintrin.h> instead."
21 #endif
22
23 #ifndef _AMXTF32INTRIN_H_INCLUDED
24 #define _AMXTF32INTRIN_H_INCLUDED
25
26 #if !defined(__AMX_TF32__)
27 #pragma GCC push_options
28 #pragma GCC target("amx-tf32")
29 #define __DISABLE_AMX_TF32__
30 #endif /* __AMX_TF32__ */
31
32 #if defined(__x86_64__)
33 #define _tile_mmultf32ps_internal(src1_dst,src2,src3) \
34 __asm__ volatile \
35 ("{tmmultf32ps\t%%tmm%c[_src3], %%tmm%c[_src2], %%tmm%c[_src1_dst] \
36 |tmmultf32ps\ttmm%c[_src1_dst], tmm%c[_src2], tmm%c[_src3]}" \
37 :: [_src1_dst]"i"(src1_dst), [_src2]"i"(src2), [_src3]"i"(src3))
38
39 #define _tile_mmultf32ps(src1_dst,src2,src3) \
40 _tile_mmultf32ps_internal (src1_dst, src2, src3)
41
42 #endif
43
44 #ifdef __DISABLE_AMX_TF32__
45 #undef __DISABLE_AMX_TF32__
46 #pragma GCC pop_options
47 #endif /* __DISABLE_AMX_TF32__ */
48
49 #endif /* _AMXTF32INTRIN_H_INCLUDED */