Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Process / Utility / RegisterContextPOSIX_mips64.h
blobb66dc3f4452490e949e384f693249f4fdfab6566
1 //===-- RegisterContextPOSIX_mips64.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_REGISTERCONTEXTPOSIX_MIPS64_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_MIPS64_H
12 #include "RegisterContext_mips.h"
13 #include "RegisterInfoInterface.h"
14 #include "lldb/Target/RegisterContext.h"
15 #include "lldb/Utility/Log.h"
17 class RegisterContextPOSIX_mips64 : public lldb_private::RegisterContext {
18 public:
20 enum Register_count{
21 gpr_registers_count = 0,
22 fpr_registers_count,
23 msa_registers_count,
24 register_set_count
27 RegisterContextPOSIX_mips64(
28 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
29 lldb_private::RegisterInfoInterface *register_info);
31 ~RegisterContextPOSIX_mips64() override;
33 void Invalidate();
35 void InvalidateAllRegisters() override;
37 size_t GetRegisterCount() override;
39 virtual size_t GetGPRSize();
41 virtual unsigned GetRegisterSize(unsigned reg);
43 virtual unsigned GetRegisterOffset(unsigned reg);
45 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
47 size_t GetRegisterSetCount() override;
49 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
51 const char *GetRegisterName(unsigned reg);
53 uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
54 uint32_t num) override;
56 protected:
57 uint32_t m_num_registers;
58 uint8_t m_registers_count[register_set_count];
59 std::unique_ptr<lldb_private::RegisterInfoInterface>
60 m_register_info_up; // Register Info Interface (FreeBSD or Linux)
62 // Determines if an extended register set is supported on the processor
63 // running the inferior process.
64 virtual bool IsRegisterSetAvailable(size_t set_index);
66 virtual const lldb_private::RegisterInfo *GetRegisterInfo();
68 bool IsGPR(unsigned reg);
70 bool IsFPR(unsigned reg);
72 virtual bool ReadGPR() = 0;
73 virtual bool ReadFPR() = 0;
74 virtual bool WriteGPR() = 0;
75 virtual bool WriteFPR() = 0;
78 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_MIPS64_H