From 4f8e86ad67ef7e528855cf4f6df7bd12b11e92cd Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 14 Jul 2020 17:41:20 +0200 Subject: [PATCH] LibX86: Remove Instruction::m_handler We can fetch the handler via Instruction::m_descriptor. --- Libraries/LibX86/Instruction.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Libraries/LibX86/Instruction.h b/Libraries/LibX86/Instruction.h index 8c575dee76..bb7d1926fc 100644 --- a/Libraries/LibX86/Instruction.h +++ b/Libraries/LibX86/Instruction.h @@ -425,7 +425,7 @@ public: return m_modrm; } - ALWAYS_INLINE InstructionHandler handler() const { return m_handler; } + ALWAYS_INLINE InstructionHandler handler() const { return m_descriptor->handler; } bool has_segment_prefix() const { return m_segment_prefix.has_value(); } Optional segment_prefix() const { return m_segment_prefix; } @@ -811,7 +811,7 @@ ALWAYS_INLINE unsigned Instruction::length() const return len; } -ALWAYS_INLINE static Optional to_segment_prefix(u8 op) +ALWAYS_INLINE Optional to_segment_prefix(u8 op) { switch (op) { case 0x26: @@ -935,8 +935,6 @@ ALWAYS_INLINE Instruction::Instruction(InstructionStreamType& stream, bool o32, break; } - m_handler = m_descriptor->handler; - #ifdef DISALLOW_INVALID_LOCK_PREFIX if (m_has_lock_prefix && !m_descriptor->lock_prefix_allowed) { fprintf(stderr, "Instruction not allowed with LOCK prefix, this will raise #UD\n");