LLDB mainline
RegisterContextPOSIX_loongarch64.h
Go to the documentation of this file.
1//===-- RegisterContextPOSIX_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//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_LOONGARCH64_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_LOONGARCH64_H
11
16#include "lldb/Utility/Log.h"
17
19public:
22 std::unique_ptr<RegisterInfoPOSIX_loongarch64> register_info);
23
25
26 void invalidate();
27
28 void InvalidateAllRegisters() override;
29
30 size_t GetRegisterCount() override;
31
32 virtual size_t GetGPRSize();
33
34 virtual unsigned GetRegisterSize(unsigned reg);
35
36 virtual unsigned GetRegisterOffset(unsigned reg);
37
38 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
39
40 size_t GetRegisterSetCount() override;
41
42 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
43
44protected:
45 std::unique_ptr<RegisterInfoPOSIX_loongarch64> m_register_info_up;
46
48
49 bool IsGPR(unsigned reg);
50
51 bool IsFPR(unsigned reg);
52
54
55 uint32_t GetRegNumFCSR() const { return fpr_fcsr_loongarch; }
56
57 virtual bool ReadGPR() = 0;
58 virtual bool ReadFPR() = 0;
59 virtual bool WriteGPR() = 0;
60 virtual bool WriteFPR() = 0;
61};
62
63#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_LOONGARCH64_H
std::unique_ptr< RegisterInfoPOSIX_loongarch64 > m_register_info_up
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
virtual unsigned GetRegisterOffset(unsigned reg)
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.