mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibX86: Remove Instruction::m_handler
We can fetch the handler via Instruction::m_descriptor.
This commit is contained in:
parent
5fd8dbacb1
commit
4f8e86ad67
1 changed files with 2 additions and 4 deletions
|
@ -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<SegmentRegister> segment_prefix() const { return m_segment_prefix; }
|
||||
|
@ -811,7 +811,7 @@ ALWAYS_INLINE unsigned Instruction::length() const
|
|||
return len;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static Optional<SegmentRegister> to_segment_prefix(u8 op)
|
||||
ALWAYS_INLINE Optional<SegmentRegister> 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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue