mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibX86: Don't assert just because insn has no immediate bytes
It's perfectly fine to not have immediate bytes. Many insns don't :^)
This commit is contained in:
parent
df7ddfb803
commit
de149dc7fa
Notes:
sideshowbarker
2024-07-18 22:37:28 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/de149dc7fa5
1 changed files with 4 additions and 2 deletions
|
@ -864,7 +864,8 @@ ALWAYS_INLINE Instruction::Instruction(InstructionStreamType& stream, bool o32,
|
|||
m_imm2 = stream.read32();
|
||||
break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
ASSERT(imm2_bytes == 0);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (imm1_bytes) {
|
||||
|
@ -878,7 +879,8 @@ ALWAYS_INLINE Instruction::Instruction(InstructionStreamType& stream, bool o32,
|
|||
m_imm1 = stream.read32();
|
||||
break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
ASSERT(imm1_bytes == 0);
|
||||
break;
|
||||
}
|
||||
|
||||
m_extra_bytes = prefix_bytes + imm1_bytes + imm2_bytes;
|
||||
|
|
Loading…
Reference in a new issue