Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Process / Utility / RegisterInfoPOSIX_loongarch64.h
bloba3338acbbc97bd1d35f2f18b435b513dfbbd5472
1 //===-- RegisterInfoPOSIX_loongarch64.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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIX_LOONGARCH64_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIX_LOONGARCH64_H
12 #include "RegisterInfoAndSetInterface.h"
13 #include "lldb/Target/RegisterContext.h"
14 #include "lldb/lldb-private.h"
15 #include <map>
17 class RegisterInfoPOSIX_loongarch64
18 : public lldb_private::RegisterInfoAndSetInterface {
19 public:
20 static const lldb_private::RegisterInfo *
21 GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch);
22 static uint32_t
23 GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch);
25 public:
26 enum RegSetKind {
27 GPRegSet,
28 FPRegSet,
31 struct GPR {
32 uint64_t gpr[32];
34 uint64_t orig_a0;
35 uint64_t csr_era;
36 uint64_t csr_badv;
37 uint64_t reserved[10];
40 struct FPR {
41 uint64_t fpr[32];
42 uint64_t fcc;
43 uint32_t fcsr;
46 RegisterInfoPOSIX_loongarch64(const lldb_private::ArchSpec &target_arch,
47 lldb_private::Flags flags);
49 size_t GetGPRSize() const override;
51 size_t GetFPRSize() const override;
53 const lldb_private::RegisterInfo *GetRegisterInfo() const override;
55 uint32_t GetRegisterCount() const override;
57 const lldb_private::RegisterSet *
58 GetRegisterSet(size_t reg_set) const override;
60 size_t GetRegisterSetCount() const override;
62 size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override;
64 private:
65 const lldb_private::RegisterInfo *m_register_info_p;
66 uint32_t m_register_info_count;
69 #endif