diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-01-09 16:47:47 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-01-09 16:47:47 -0500 |
| commit | 6ef9dd016c957e796f89f94f00c6d71e2f7589e8 (patch) | |
| tree | 5ab4ab48cf8f47c4e5325f3b3ae4cf9e5e8d5194 /architecture.cpp | |
| parent | 16a4d413d58d2cb29be97781bba0b52546afa390 (diff) | |
| parent | 26edabfdd7211012c7c8a03186d3025eea9aa345 (diff) | |
Merge branch 'dev'
Diffstat (limited to 'architecture.cpp')
| -rw-r--r-- | architecture.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/architecture.cpp b/architecture.cpp index eb588394..66372bcb 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -30,6 +30,7 @@ using namespace std; InstructionInfo::InstructionInfo() { length = 0; + archTransitionByTargetAddr = false; branchCount = 0; branchDelay = false; } @@ -111,6 +112,13 @@ size_t Architecture::GetDefaultIntegerSizeCallback(void* ctxt) } +size_t Architecture::GetInstructionAlignmentCallback(void* ctxt) +{ + Architecture* arch = (Architecture*)ctxt; + return arch->GetInstructionAlignment(); +} + + size_t Architecture::GetMaxInstructionLengthCallback(void* ctxt) { Architecture* arch = (Architecture*)ctxt; @@ -443,6 +451,7 @@ void Architecture::Register(Architecture* arch) callbacks.getEndianness = GetEndiannessCallback; callbacks.getAddressSize = GetAddressSizeCallback; callbacks.getDefaultIntegerSize = GetDefaultIntegerSizeCallback; + callbacks.getInstructionAlignment = GetInstructionAlignmentCallback; callbacks.getMaxInstructionLength = GetMaxInstructionLengthCallback; callbacks.getOpcodeDisplayLength = GetOpcodeDisplayLengthCallback; callbacks.getAssociatedArchitectureByAddress = GetAssociatedArchitectureByAddressCallback; @@ -523,6 +532,12 @@ size_t Architecture::GetDefaultIntegerSize() const } +size_t Architecture::GetInstructionAlignment() const +{ + return 1; +} + + size_t Architecture::GetMaxInstructionLength() const { return BN_DEFAULT_NSTRUCTION_LENGTH; @@ -905,6 +920,12 @@ size_t CoreArchitecture::GetDefaultIntegerSize() const } +size_t CoreArchitecture::GetInstructionAlignment() const +{ + return BNGetArchitectureInstructionAlignment(m_object); +} + + size_t CoreArchitecture::GetMaxInstructionLength() const { return BNGetArchitectureMaxInstructionLength(m_object); |
