]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/arch/aarch64-scalable-linux.h
Fix typo in tui-data.h
[thirdparty/binutils-gdb.git] / gdb / arch / aarch64-scalable-linux.h
CommitLineData
ca65640f
LM
1/* Common AArch64 Linux arch-specific definitions for the scalable
2 extensions: SVE and SME.
3
1d506c26 4 Copyright (C) 2023-2024 Free Software Foundation, Inc.
ca65640f
LM
5
6 This file is part of GDB.
7
8 This program 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 of the License, or
11 (at your option) any later version.
12
13 This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
20
21#ifndef ARCH_AARCH64_SCALABLE_LINUX_H
22#define ARCH_AARCH64_SCALABLE_LINUX_H
23
69bfb2b6 24#include "gdbsupport/common-regcache.h"
ca65640f
LM
25
26/* Feature check for Scalable Matrix Extension. */
27#ifndef HWCAP2_SME
28#define HWCAP2_SME (1 << 23)
29#endif
30
42019af6
LM
31/* Feature check for Scalable Matrix Extension 2. */
32#ifndef HWCAP2_SME2
33#define HWCAP2_SME2 (1UL << 37)
34#define HWCAP2_SME2P1 (1UL << 38)
35#endif
36
ca65640f
LM
37/* Streaming mode enabled/disabled bit. */
38#define SVCR_SM_BIT (1 << 0)
39/* ZA enabled/disabled bit. */
40#define SVCR_ZA_BIT (1 << 1)
41/* Mask including all valid SVCR bits. */
42#define SVCR_BIT_MASK (SVCR_SM_BIT | SVCR_ZA_BIT)
43
69bfb2b6
LM
44/* SVE/SSVE-related constants used for an empty SVE/SSVE register set
45 dumped to a core file. When SME is supported, either the SVE state or
46 the SSVE state will be empty when it is dumped to a core file. */
47#define SVE_CORE_DUMMY_SIZE 0x220
48#define SVE_CORE_DUMMY_MAX_SIZE 0x2240
49#define SVE_CORE_DUMMY_VL 0x10
50#define SVE_CORE_DUMMY_MAX_VL 0x100
51#define SVE_CORE_DUMMY_FLAGS 0x0
52#define SVE_CORE_DUMMY_RESERVED 0x0
53
54/* Return TRUE if the SVE state in the register cache REGCACHE
55 is empty (zero). Return FALSE otherwise. */
56extern bool sve_state_is_empty (const struct reg_buffer_common *reg_buf);
57
ca65640f 58#endif /* ARCH_AARCH64_SCALABLE_LINUX_H */