[LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns ...
[llvm-project.git] / lldb / source / Plugins / Instruction / ARM / EmulationStateARM.h
blob6cf842aec18dc2d488f7b51947c0f8d6e7f07a3a
1 //===-- EmulationStateARM.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_INSTRUCTION_ARM_EMULATIONSTATEARM_H
10 #define LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATIONSTATEARM_H
12 #include <map>
14 #include "lldb/Core/EmulateInstruction.h"
15 #include "lldb/Core/Opcode.h"
17 class EmulationStateARM {
18 public:
19 EmulationStateARM();
21 virtual ~EmulationStateARM();
23 bool StorePseudoRegisterValue(uint32_t reg_num, uint64_t value);
25 uint64_t ReadPseudoRegisterValue(uint32_t reg_num, bool &success);
27 bool StoreToPseudoAddress(lldb::addr_t p_address, uint32_t value);
29 uint32_t ReadFromPseudoAddress(lldb::addr_t p_address, bool &success);
31 void ClearPseudoRegisters();
33 void ClearPseudoMemory();
35 bool LoadStateFromDictionary(lldb_private::OptionValueDictionary *test_data);
37 bool CompareState(EmulationStateARM &other_state,
38 lldb_private::Stream &out_stream);
40 static size_t
41 ReadPseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton,
42 const lldb_private::EmulateInstruction::Context &context,
43 lldb::addr_t addr, void *dst, size_t length);
45 static size_t
46 WritePseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton,
47 const lldb_private::EmulateInstruction::Context &context,
48 lldb::addr_t addr, const void *dst, size_t length);
50 static bool ReadPseudoRegister(lldb_private::EmulateInstruction *instruction,
51 void *baton,
52 const lldb_private::RegisterInfo *reg_info,
53 lldb_private::RegisterValue &reg_value);
55 static bool
56 WritePseudoRegister(lldb_private::EmulateInstruction *instruction,
57 void *baton,
58 const lldb_private::EmulateInstruction::Context &context,
59 const lldb_private::RegisterInfo *reg_info,
60 const lldb_private::RegisterValue &reg_value);
62 private:
63 bool LoadRegistersStateFromDictionary(
64 lldb_private::OptionValueDictionary *reg_dict, char kind, int first_reg,
65 int num);
67 uint32_t m_gpr[17] = {0};
68 struct _sd_regs {
69 uint32_t s_regs[32]; // sregs 0 - 31 & dregs 0 - 15
71 uint64_t d_regs[16]; // dregs 16-31
73 } m_vfp_regs;
75 std::map<lldb::addr_t, uint32_t> m_memory; // Eventually will want to change
76 // uint32_t to a data buffer heap
77 // type.
79 EmulationStateARM(const EmulationStateARM &) = delete;
80 const EmulationStateARM &operator=(const EmulationStateARM &) = delete;
83 #endif // LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATIONSTATEARM_H