Modified existing Emulate* methods to call LoadWritePC(context, data) where appropriate to
effect an interworking branch if the ArchVersion() is ARMv5T and above.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125227 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
index a95a307..781b40b 100644
--- a/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ b/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -1644,7 +1644,8 @@
uint32_t data = ReadMemoryUnsigned (context, base_address + offset, addr_byte_size, 0, &success);
if (!success)
return false;
- if (!WriteRegisterUnsigned (context, eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, data))
+ // In ARMv5T and above, this is an interworking branch.
+ if (!LoadWritePC(context, data))
return false;
}
@@ -1770,7 +1771,8 @@
uint32_t data = ReadMemoryUnsigned (context, address + offset, addr_byte_size, 0, &success);
if (!success)
return false;
- if (!WriteRegisterUnsigned (context, eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, data))
+ // In ARMv5T and above, this is an interworking branch.
+ if (!LoadWritePC(context, data))
return false;
}
@@ -1874,7 +1876,8 @@
uint32_t data = ReadMemoryUnsigned (context, address + offset, addr_byte_size, 0, &success);
if (!success)
return false;
- if (!WriteRegisterUnsigned (context, eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, data))
+ // In ARMv5T and above, this is an interworking branch.
+ if (!LoadWritePC(context, data))
return false;
}