1 //===-- ABISysV_hexagon.h ----------------------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef liblldb_ABISysV_hexagon_h_
12 #define liblldb_ABISysV_hexagon_h_
16 // Other libraries and framework includes
18 #include "lldb/Target/ABI.h"
19 #include "lldb/lldb-private.h"
21 class ABISysV_hexagon : public lldb_private::ABI {
23 ~ABISysV_hexagon() override = default;
25 size_t GetRedZoneSize() const override;
27 bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
28 lldb::addr_t functionAddress,
29 lldb::addr_t returnAddress,
30 llvm::ArrayRef<lldb::addr_t> args) const override;
32 // special thread plan for GDB style non-jit function calls
34 PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
35 lldb::addr_t functionAddress, lldb::addr_t returnAddress,
36 llvm::Type &prototype,
37 llvm::ArrayRef<ABI::CallArgument> args) const override;
39 bool GetArgumentValues(lldb_private::Thread &thread,
40 lldb_private::ValueList &values) const override;
43 SetReturnValueObject(lldb::StackFrameSP &frame_sp,
44 lldb::ValueObjectSP &new_value) override;
47 GetReturnValueObjectImpl(lldb_private::Thread &thread,
48 lldb_private::CompilerType &type) const override;
50 // specialized to work with llvm IR types
51 lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread,
52 llvm::Type &type) const override;
55 CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
57 bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
59 bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
61 bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
62 // Make sure the stack call frame addresses are 8 byte aligned
64 return false; // Not 8 byte aligned
66 return false; // Zero is not a valid stack address
70 bool CodeAddressIsValid(lldb::addr_t pc) override {
71 // We have a 64 bit address space, so anything is valid as opcodes
72 // aren't fixed width...
76 const lldb_private::RegisterInfo *
77 GetRegisterInfoArray(uint32_t &count) override;
79 //------------------------------------------------------------------
81 //------------------------------------------------------------------
83 static void Initialize();
85 static void Terminate();
87 static lldb::ABISP CreateInstance(const lldb_private::ArchSpec &arch);
89 static lldb_private::ConstString GetPluginNameStatic();
91 //------------------------------------------------------------------
92 // PluginInterface protocol
93 //------------------------------------------------------------------
95 lldb_private::ConstString GetPluginName() override;
97 uint32_t GetPluginVersion() override;
100 void CreateRegisterMapIfNeeded();
103 GetReturnValueObjectSimple(lldb_private::Thread &thread,
104 lldb_private::CompilerType &ast_type) const;
106 bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
109 ABISysV_hexagon() : lldb_private::ABI() {
110 // Call CreateInstance instead.
114 #endif // liblldb_ABISysV_hexagon_h_