]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / source / Plugins / Process / Utility / RegisterInfoPOSIX_arm64.h
1 //===-- RegisterInfoPOSIX_arm64.h -------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef liblldb_RegisterContextLinux_arm64_H_
10 #define liblldb_RegisterContextLinux_arm64_H_
11
12 #include "RegisterInfoInterface.h"
13 #include "lldb/Target/RegisterContext.h"
14 #include "lldb/lldb-private.h"
15
16 class RegisterInfoPOSIX_arm64 : public lldb_private::RegisterInfoInterface {
17 public:
18   // based on RegisterContextDarwin_arm64.h
19   struct GPR {
20     uint64_t x[29]; // x0-x28
21     uint64_t fp;    // x29
22     uint64_t lr;    // x30
23     uint64_t sp;    // x31
24     uint64_t pc;    // pc
25     uint32_t cpsr;  // cpsr
26   };
27
28   // based on RegisterContextDarwin_arm64.h
29   struct VReg {
30     uint8_t bytes[16];
31   };
32
33   // based on RegisterContextDarwin_arm64.h
34   struct FPU {
35     VReg v[32];
36     uint32_t fpsr;
37     uint32_t fpcr;
38   };
39
40   // based on RegisterContextDarwin_arm64.h
41   struct EXC {
42     uint64_t far;       // Virtual Fault Address
43     uint32_t esr;       // Exception syndrome
44     uint32_t exception; // number of arm exception token
45   };
46
47   // based on RegisterContextDarwin_arm64.h
48   struct DBG {
49     uint64_t bvr[16];
50     uint64_t bcr[16];
51     uint64_t wvr[16];
52     uint64_t wcr[16];
53     uint64_t mdscr_el1;
54   };
55
56   RegisterInfoPOSIX_arm64(const lldb_private::ArchSpec &target_arch);
57
58   size_t GetGPRSize() const override;
59
60   const lldb_private::RegisterInfo *GetRegisterInfo() const override;
61
62   uint32_t GetRegisterCount() const override;
63
64 private:
65   const lldb_private::RegisterInfo *m_register_info_p;
66   uint32_t m_register_info_count;
67 };
68
69 #endif