mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 03:50:33 +08:00
Fix various things in the instruction emulation code:
- Add ability to control whether or not the emulator advances the
PC register (in the emulation state), if the instruction itself
does not change the pc value..
- Fix a few typos in asm description strings.
- Fix bug in the carry flag calculation.
llvm-svn: 129168
This commit is contained in:
@@ -116,7 +116,7 @@ SBInstruction::Print (FILE *out)
|
||||
}
|
||||
|
||||
bool
|
||||
SBInstruction::EmulateWithFrame (lldb::SBFrame &frame)
|
||||
SBInstruction::EmulateWithFrame (lldb::SBFrame &frame, bool auto_advance_pc)
|
||||
{
|
||||
if (m_opaque_sp && frame.get())
|
||||
{
|
||||
@@ -126,6 +126,7 @@ SBInstruction::EmulateWithFrame (lldb::SBFrame &frame)
|
||||
lldb_private::ArchSpec arch = target->GetArchitecture();
|
||||
|
||||
return m_opaque_sp->Emulate (arch,
|
||||
auto_advance_pc,
|
||||
(void *) frame.get(),
|
||||
&lldb_private::EmulateInstruction::ReadMemoryFrame,
|
||||
&lldb_private::EmulateInstruction::WriteMemoryFrame,
|
||||
@@ -142,12 +143,8 @@ SBInstruction::DumpEmulation (const char *triple)
|
||||
{
|
||||
lldb_private::ArchSpec arch (triple, NULL);
|
||||
|
||||
return m_opaque_sp->Emulate (arch,
|
||||
NULL,
|
||||
&lldb_private::EmulateInstruction::ReadMemoryDefault,
|
||||
&lldb_private::EmulateInstruction::WriteMemoryDefault,
|
||||
&lldb_private::EmulateInstruction::ReadRegisterDefault,
|
||||
&lldb_private::EmulateInstruction::WriteRegisterDefault);
|
||||
return m_opaque_sp->DumpEmulation (arch);
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user