Skip to content

Commit 63725eb

Browse files
committed
[NFC] Remove no-op code from x86AssemblyInspectionEngine::jmp_to_reg_p
Slava Gurevich noticed this dead code I wrote in jmp_to_reg_p is never executed, is duplicated, and has comments that seem to describe the opposite behavior. Remove the dead code that cannot be executed. Differential Revision: https://reviews.llvm.org/D131029
1 parent c7bd61d commit 63725eb

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -682,10 +682,6 @@ bool x86AssemblyInspectionEngine::jmp_to_reg_p() {
682682
// The second byte is a ModR/M /4 byte, strip off the registers
683683
uint8_t second_byte_sans_reg = *(m_cur_insn + 1) & ~7;
684684

685-
// Don't handle 0x24 disp32, because the target address is
686-
// knowable statically - pc_rel_branch_or_jump_p() will
687-
// return the target address.
688-
689685
// [reg]
690686
if (second_byte_sans_reg == 0x20)
691687
return true;
@@ -702,17 +698,6 @@ bool x86AssemblyInspectionEngine::jmp_to_reg_p() {
702698
if (second_byte_sans_reg == 0xe0)
703699
return true;
704700

705-
// disp32
706-
// jumps to an address stored in memory, the value can't be cached
707-
// in an unwind plan.
708-
if (second_byte_sans_reg == 0x24)
709-
return true;
710-
711-
// use SIB byte
712-
// ff 24 fe jmpq *(%rsi,%rdi,8)
713-
if (second_byte_sans_reg == 0x24)
714-
return true;
715-
716701
return false;
717702
}
718703

0 commit comments

Comments
 (0)