[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / lldb / source / Plugins / Process / Utility / RegisterContextPOSIX_s390x.h
blob7027af04f0bb2d74379c3dd84069f3314685d025
1 //===-- RegisterContextPOSIX_s390x.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_S390X_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
12 #include "RegisterContext_s390x.h"
13 #include "RegisterInfoInterface.h"
14 #include "lldb-s390x-register-enums.h"
15 #include "lldb/Target/RegisterContext.h"
16 #include "lldb/Utility/Log.h"
18 class RegisterContextPOSIX_s390x : public lldb_private::RegisterContext {
19 public:
20 RegisterContextPOSIX_s390x(
21 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
22 lldb_private::RegisterInfoInterface *register_info);
24 ~RegisterContextPOSIX_s390x() override;
26 void Invalidate();
28 void InvalidateAllRegisters() override;
30 size_t GetRegisterCount() override;
32 virtual unsigned GetRegisterSize(unsigned reg);
34 virtual unsigned GetRegisterOffset(unsigned reg);
36 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
38 size_t GetRegisterSetCount() override;
40 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
42 const char *GetRegisterName(unsigned reg);
44 protected:
45 struct RegInfo {
46 uint32_t num_registers;
47 uint32_t num_gpr_registers;
48 uint32_t num_fpr_registers;
50 uint32_t last_gpr;
51 uint32_t first_fpr;
52 uint32_t last_fpr;
55 RegInfo m_reg_info;
56 std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_up;
58 virtual bool IsRegisterSetAvailable(size_t set_index);
60 virtual const lldb_private::RegisterInfo *GetRegisterInfo();
62 bool IsGPR(unsigned reg);
64 bool IsFPR(unsigned reg);
66 virtual bool ReadGPR() = 0;
67 virtual bool ReadFPR() = 0;
68 virtual bool WriteGPR() = 0;
69 virtual bool WriteFPR() = 0;
72 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H