]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/loongarch/loongarch-modes.def
Update copyright years.
[thirdparty/gcc.git] / gcc / config / loongarch / loongarch-modes.def
1 /* LoongArch extra machine modes.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3 Contributed by Loongson Ltd.
4 Based on MIPS target for GNU compiler.
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
21
22 FLOAT_MODE (TF, 16, ieee_quad_format);
23
24 /* For floating point conditions in FCC registers. */
25 CC_MODE (FCC);
26
27 /* Vector modes. */
28 VECTOR_MODES (INT, 4); /* V4QI V2HI */
29 VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */
30 VECTOR_MODES (FLOAT, 8); /* V4HF V2SF */
31
32 /* For LARCH LSX 128 bits. */
33 VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */
34 VECTOR_MODES (FLOAT, 16); /* V4SF V2DF */
35
36 /* For LARCH LASX 256 bits. */
37 VECTOR_MODES (INT, 32); /* V32QI V16HI V8SI V4DI */
38 VECTOR_MODES (FLOAT, 32); /* V8SF V4DF */
39
40 /* Double-sized vector modes for vec_concat. */
41 /* VECTOR_MODE (INT, QI, 32); V32QI */
42 /* VECTOR_MODE (INT, HI, 16); V16HI */
43 /* VECTOR_MODE (INT, SI, 8); V8SI */
44 /* VECTOR_MODE (INT, DI, 4); V4DI */
45 /* VECTOR_MODE (FLOAT, SF, 8); V8SF */
46 /* VECTOR_MODE (FLOAT, DF, 4); V4DF */
47
48 VECTOR_MODE (INT, QI, 64); /* V64QI */
49 VECTOR_MODE (INT, HI, 32); /* V32HI */
50 VECTOR_MODE (INT, SI, 16); /* V16SI */
51 VECTOR_MODE (INT, DI, 8); /* V8DI */
52 VECTOR_MODE (FLOAT, SF, 16); /* V16SF */
53 VECTOR_MODE (FLOAT, DF, 8); /* V8DF */
54
55 VECTOR_MODES (FRACT, 4); /* V4QQ V2HQ */
56 VECTOR_MODES (UFRACT, 4); /* V4UQQ V2UHQ */
57 VECTOR_MODES (ACCUM, 4); /* V2HA */
58 VECTOR_MODES (UACCUM, 4); /* V2UHA */
59
60 INT_MODE (OI, 32);
61
62 /* Keep the OI modes from confusing the compiler into thinking
63 that these modes could actually be used for computation. They are
64 only holders for vectors during data movement. */