aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm-mve-builtins.def
blob: e3f378762104edd1737a6765b04bce5c00e8a08b (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* Builtin lists for Arm MVE
   Copyright (C) 2021-2023 Free Software Foundation, Inc.

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3, or (at your option)
   any later version.

   GCC is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

#ifndef DEF_MVE_MODE
#define DEF_MVE_MODE(A, B, C, D)
#endif

#ifndef DEF_MVE_TYPE
#define DEF_MVE_TYPE(A, B)
#endif

#ifndef DEF_MVE_TYPE_SUFFIX
#define DEF_MVE_TYPE_SUFFIX(A, B, C, D, E)
#endif

#ifndef DEF_MVE_FUNCTION
#define DEF_MVE_FUNCTION(A, B, C, D)
#endif

DEF_MVE_MODE (n, none, none, none)
DEF_MVE_MODE (offset, none, none, bytes)
DEF_MVE_MODE (r, none, none, none)

#define REQUIRES_FLOAT false
DEF_MVE_TYPE (mve_pred16_t, boolean_type_node)
DEF_MVE_TYPE (uint8x16_t, unsigned_intQI_type_node)
DEF_MVE_TYPE (uint16x8_t, unsigned_intHI_type_node)
DEF_MVE_TYPE (uint32x4_t, unsigned_intSI_type_node)
DEF_MVE_TYPE (uint64x2_t, unsigned_intDI_type_node)
DEF_MVE_TYPE (int8x16_t, intQI_type_node)
DEF_MVE_TYPE (int16x8_t, intHI_type_node)
DEF_MVE_TYPE (int32x4_t, intSI_type_node)
DEF_MVE_TYPE (int64x2_t, intDI_type_node)
#undef REQUIRES_FLOAT

#define REQUIRES_FLOAT true
DEF_MVE_TYPE (float16x8_t, arm_fp16_type_node)
DEF_MVE_TYPE (float32x4_t, float_type_node)
#undef REQUIRES_FLOAT

#define REQUIRES_FLOAT false
DEF_MVE_TYPE_SUFFIX (s8, int8x16_t, signed, 8, V16QImode)
DEF_MVE_TYPE_SUFFIX (s16, int16x8_t, signed, 16, V8HImode)
DEF_MVE_TYPE_SUFFIX (s32, int32x4_t, signed, 32, V4SImode)
DEF_MVE_TYPE_SUFFIX (s64, int64x2_t, signed, 64, V2DImode)
DEF_MVE_TYPE_SUFFIX (u8, uint8x16_t, unsigned, 8, V16QImode)
DEF_MVE_TYPE_SUFFIX (u16, uint16x8_t, unsigned, 16, V8HImode)
DEF_MVE_TYPE_SUFFIX (u32, uint32x4_t, unsigned, 32, V4SImode)
DEF_MVE_TYPE_SUFFIX (u64, uint64x2_t, unsigned, 64, V2DImode)
#undef REQUIRES_FLOAT

#define REQUIRES_FLOAT true
DEF_MVE_TYPE_SUFFIX (f16, float16x8_t, float, 16, V8HFmode)
DEF_MVE_TYPE_SUFFIX (f32, float32x4_t, float, 32, V4SFmode)
#undef REQUIRES_FLOAT

#include "arm-mve-builtins-base.def"

#undef DEF_MVE_TYPE
#undef DEF_MVE_TYPE_SUFFIX
#undef DEF_MVE_FUNCTION
#undef DEF_MVE_MODE