Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Process / Utility / RegisterContextPOSIX_ppc64le.h
blob66794ec9e9cabef42e21add557f6fdb2abf31a7a
1 //===-- RegisterContextPOSIX_ppc64le.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_PPC64LE_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_PPC64LE_H
12 #include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
13 #include "RegisterInfoInterface.h"
14 #include "Utility/PPC64LE_DWARF_Registers.h"
15 #include "lldb/Target/RegisterContext.h"
16 #include "lldb/Utility/Log.h"
18 class RegisterContextPOSIX_ppc64le : public lldb_private::RegisterContext {
19 public:
20 RegisterContextPOSIX_ppc64le(
21 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
22 lldb_private::RegisterInfoInterface *register_info);
24 void InvalidateAllRegisters() override;
26 size_t GetRegisterCount() override;
28 virtual size_t GetGPRSize();
30 virtual unsigned GetRegisterSize(unsigned reg);
32 virtual unsigned GetRegisterOffset(unsigned reg);
34 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
36 size_t GetRegisterSetCount() override;
38 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
40 const char *GetRegisterName(unsigned reg);
42 protected:
43 // 64-bit general purpose registers.
44 uint64_t m_gpr_ppc64le[k_num_gpr_registers_ppc64le];
46 // floating-point registers including extended register.
47 uint64_t m_fpr_ppc64le[k_num_fpr_registers_ppc64le];
49 // VMX registers.
50 uint64_t m_vmx_ppc64le[k_num_vmx_registers_ppc64le * 2];
52 // VSX registers.
53 uint64_t m_vsx_ppc64le[k_num_vsx_registers_ppc64le * 2];
55 std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_up;
57 // Determines if an extended register set is supported on the processor
58 // running the inferior process.
59 virtual bool IsRegisterSetAvailable(size_t set_index);
61 virtual const lldb_private::RegisterInfo *GetRegisterInfo();
63 bool IsGPR(unsigned reg);
65 bool IsFPR(unsigned reg);
67 bool IsVMX(unsigned reg);
69 bool IsVSX(unsigned reg);
73 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_PPC64LE_H