GNU Binutils with patches for OS216
Revisión | 04af1924d97910a274be9d569f98b1f4a714ea8f (tree) |
---|---|
Tiempo | 2020-06-26 01:23:38 |
Autor | Luis Machado <luis.machado@lina...> |
Commiter | Luis Machado |
AArch64: Add MTE CPU feature check support
This patch is a preparation for the next patches implementing MTE. It just adds
a HWCAP2 constant for MTE, creates a new generic arch/aarch64-mte-linux.h file
and includes that file in the source files that will use it.
gdb/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* Makefile.in (HFILES_NO_SRCDIR): Add arch/aarch64-mte-linux.h.
* aarch64-linux-nat.c: Include arch/aarch64-mte-linux.h.
* aarch64-linux-tdep.c: Likewise
* arch/aarch64-mte-linux.h: New file.
gdbserver/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* linux-aarch64-low.cc: Include arch/aarch64-mte-linux.h.
@@ -1444,6 +1444,7 @@ HFILES_NO_SRCDIR = \ | ||
1444 | 1444 | arch/aarch32.h \ |
1445 | 1445 | arch/aarch64.h \ |
1446 | 1446 | arch/aarch64-insn.h \ |
1447 | + arch/aarch64-mte-linux.h \ | |
1447 | 1448 | arch/arc.h \ |
1448 | 1449 | arch/arm.h \ |
1449 | 1450 | arch/i386.h \ |
@@ -50,6 +50,8 @@ | ||
50 | 50 | #include "gdb_proc_service.h" |
51 | 51 | #include "arch-utils.h" |
52 | 52 | |
53 | +#include "arch/aarch64-mte-linux.h" | |
54 | + | |
53 | 55 | #ifndef TRAP_HWBKPT |
54 | 56 | #define TRAP_HWBKPT 0x0004 |
55 | 57 | #endif |
@@ -44,6 +44,8 @@ | ||
44 | 44 | #include "record-full.h" |
45 | 45 | #include "linux-record.h" |
46 | 46 | |
47 | +#include "arch/aarch64-mte-linux.h" | |
48 | + | |
47 | 49 | /* Signal frame handling. |
48 | 50 | |
49 | 51 | +------------+ ^ |
@@ -0,0 +1,28 @@ | ||
1 | +/* Common Linux target-dependent definitions for AArch64 MTE | |
2 | + | |
3 | + Copyright (C) 2020 Free Software Foundation, Inc. | |
4 | + | |
5 | + This file is part of GDB. | |
6 | + | |
7 | + This program is free software; you can redistribute it and/or modify | |
8 | + it under the terms of the GNU General Public License as published by | |
9 | + the Free Software Foundation; either version 3 of the License, or | |
10 | + (at your option) any later version. | |
11 | + | |
12 | + This program is distributed in the hope that it will be useful, | |
13 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | + GNU General Public License for more details. | |
16 | + | |
17 | + You should have received a copy of the GNU General Public License | |
18 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | + | |
20 | +#ifndef ARCH_AARCH64_LINUX_H | |
21 | +#define ARCH_AARCH64_LINUX_H | |
22 | + | |
23 | +/* Feature check for Memory Tagging Extension. */ | |
24 | +#ifndef HWCAP2_MTE | |
25 | +#define HWCAP2_MTE (1 << 18) | |
26 | +#endif | |
27 | + | |
28 | +#endif /* ARCH_AARCH64_LINUX_H */ |
@@ -40,6 +40,7 @@ | ||
40 | 40 | |
41 | 41 | #include "gdb_proc_service.h" |
42 | 42 | #include "arch/aarch64.h" |
43 | +#include "arch/aarch64-mte-linux.h" | |
43 | 44 | #include "linux-aarch32-tdesc.h" |
44 | 45 | #include "linux-aarch64-tdesc.h" |
45 | 46 | #include "nat/aarch64-sve-linux-ptrace.h" |