forked from OSchip/llvm-project
Add an ARMUtils.h file to house utility functions for the ARM/Thumb Instruction Set Architecture.
llvm-svn: 124131
This commit is contained in:
parent
52552c8a32
commit
91027008f1
|
@ -383,6 +383,7 @@
|
|||
AF68D2561255416E002FF25B /* RegisterContextLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */; };
|
||||
AF68D3311255A111002FF25B /* UnwindLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */; };
|
||||
AF94005911C03F6500085DB9 /* SymbolVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94005711C03F6500085DB9 /* SymbolVendor.cpp */; };
|
||||
B23DD25012EDFAC1000C3894 /* ARMUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B23DD24F12EDFAC1000C3894 /* ARMUtils.h */; };
|
||||
B296983712C2FB98002D92C3 /* CommandObjectVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
|
@ -1094,6 +1095,7 @@
|
|||
AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindLLDB.cpp; path = Utility/UnwindLLDB.cpp; sourceTree = "<group>"; };
|
||||
AF68D3301255A110002FF25B /* UnwindLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindLLDB.h; path = Utility/UnwindLLDB.h; sourceTree = "<group>"; };
|
||||
AF94005711C03F6500085DB9 /* SymbolVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolVendor.cpp; path = source/Symbol/SymbolVendor.cpp; sourceTree = "<group>"; };
|
||||
B23DD24F12EDFAC1000C3894 /* ARMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMUtils.h; path = Utility/ARMUtils.h; sourceTree = "<group>"; };
|
||||
B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectVersion.cpp; path = source/Commands/CommandObjectVersion.cpp; sourceTree = "<group>"; };
|
||||
B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectVersion.h; path = source/Commands/CommandObjectVersion.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
@ -1609,6 +1611,7 @@
|
|||
26B4666E11A2080F00CF6220 /* Utility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B23DD24F12EDFAC1000C3894 /* ARMUtils.h */,
|
||||
2621C9CC12EA009300711A30 /* EmulateInstruction.h */,
|
||||
2621CA0A12EA107700711A30 /* EmulateInstruction.cpp */,
|
||||
2621C9CF12EA066500711A30 /* EmulateInstructionARM.h */,
|
||||
|
@ -2313,6 +2316,7 @@
|
|||
4C7CF7E41295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h in Headers */,
|
||||
2621C9CE12EA009300711A30 /* EmulateInstruction.h in Headers */,
|
||||
2621C9D012EA066500711A30 /* EmulateInstructionARM.h in Headers */,
|
||||
B23DD25012EDFAC1000C3894 /* ARMUtils.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
//===-- lldb_ARMUtils.h -----------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef lldb_ARMUtils_h_
|
||||
#define lldb_ARMUtils_h_
|
||||
|
||||
// Utility functions for the ARM/Thumb Instruction Set Architecture.
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
// This function performs the check for the register numbers 13 and 15 that are
|
||||
// not permitted for many Thumb register specifiers.
|
||||
static inline bool BadReg(uint32_t n) { return n == 13 || n == 15; }
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // lldb_ARMUtils_h_
|
|
@ -8,6 +8,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "EmulateInstructionARM.h"
|
||||
#include "ARMUtils.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
@ -80,6 +81,7 @@ typedef enum ARMEncoding
|
|||
eEncodingT5,
|
||||
} ARMEncoding;
|
||||
|
||||
// Typedef for the callback function used during the emulation.
|
||||
// Pass along (ARMEncoding)encoding as the callback data.
|
||||
typedef bool (*EmulateCallback) (EmulateInstructionARM *emulator, ARMEncoding encoding);
|
||||
|
||||
|
|
Loading…
Reference in New Issue