Author: Jason Molenda Date: 2022-08-02T16:28:10-07:00 New Revision: 63725ebc182d7955c569be94b845b93d14374def
URL: https://github.com/llvm/llvm-project/commit/63725ebc182d7955c569be94b845b93d14374def DIFF: https://github.com/llvm/llvm-project/commit/63725ebc182d7955c569be94b845b93d14374def.diff LOG: [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 Added: Modified: lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp index b6e07427a5e85..2032c5a68d054 100644 --- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp +++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp @@ -682,10 +682,6 @@ bool x86AssemblyInspectionEngine::jmp_to_reg_p() { // The second byte is a ModR/M /4 byte, strip off the registers uint8_t second_byte_sans_reg = *(m_cur_insn + 1) & ~7; - // Don't handle 0x24 disp32, because the target address is - // knowable statically - pc_rel_branch_or_jump_p() will - // return the target address. - // [reg] if (second_byte_sans_reg == 0x20) return true; @@ -702,17 +698,6 @@ bool x86AssemblyInspectionEngine::jmp_to_reg_p() { if (second_byte_sans_reg == 0xe0) return true; - // disp32 - // jumps to an address stored in memory, the value can't be cached - // in an unwind plan. - if (second_byte_sans_reg == 0x24) - return true; - - // use SIB byte - // ff 24 fe jmpq *(%rsi,%rdi,8) - if (second_byte_sans_reg == 0x24) - return true; - return false; } _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
