• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- RegisterInfoPOSIX_arm.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 LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIX_ARM_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIX_ARM_H
11 
12 #include "RegisterInfoAndSetInterface.h"
13 #include "lldb/Target/RegisterContext.h"
14 #include "lldb/lldb-private.h"
15 
16 class RegisterInfoPOSIX_arm : public lldb_private::RegisterInfoAndSetInterface {
17 public:
18   enum { GPRegSet = 0, FPRegSet};
19 
20   struct GPR {
21     uint32_t r[16]; // R0-R15
22     uint32_t cpsr;  // CPSR
23   };
24 
25   struct QReg {
26     uint8_t bytes[16];
27   };
28 
29   struct FPU {
30     union {
31       uint32_t s[32];
32       uint64_t d[32];
33       QReg q[16]; // the 128-bit NEON registers
34     } floats;
35     uint32_t fpscr;
36   };
37   struct EXC {
38     uint32_t exception;
39     uint32_t fsr; /* Fault status */
40     uint32_t far; /* Virtual Fault Address */
41   };
42 
43   struct DBG {
44     uint32_t bvr[16];
45     uint32_t bcr[16];
46     uint32_t wvr[16];
47     uint32_t wcr[16];
48   };
49 
50   RegisterInfoPOSIX_arm(const lldb_private::ArchSpec &target_arch);
51 
52   size_t GetGPRSize() const override;
53 
54   size_t GetFPRSize() const override;
55 
56   const lldb_private::RegisterInfo *GetRegisterInfo() const override;
57 
58   uint32_t GetRegisterCount() const override;
59 
60   const lldb_private::RegisterSet *
61   GetRegisterSet(size_t reg_set) const override;
62 
63   size_t GetRegisterSetCount() const override;
64 
65   size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override;
66 
67 private:
68   const lldb_private::RegisterInfo *m_register_info_p;
69   uint32_t m_register_info_count;
70 };
71 
72 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIX_ARM_H
73