From 5557f05bb5b9a8248e7b219e7f344b9d0451ed54 Mon Sep 17 00:00:00 2001 From: Simon Wanner Date: Fri, 10 Nov 2023 09:07:40 +0100 Subject: [PATCH] LibX86: Support decoding F2 SSE instructions Previously the F2 table was generated, but not used by the instruction decoder. --- Userland/Libraries/LibX86/Instruction.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibX86/Instruction.h b/Userland/Libraries/LibX86/Instruction.h index 1b86444f43..394552a666 100644 --- a/Userland/Libraries/LibX86/Instruction.h +++ b/Userland/Libraries/LibX86/Instruction.h @@ -296,6 +296,7 @@ extern InstructionDescriptor s_table[3][256]; extern InstructionDescriptor s_0f_table[3][256]; extern InstructionDescriptor s_sse_table_np[256]; extern InstructionDescriptor s_sse_table_66[256]; +extern InstructionDescriptor s_sse_table_f2[256]; extern InstructionDescriptor s_sse_table_f3[256]; struct Prefix { @@ -1066,7 +1067,9 @@ ALWAYS_INLINE Instruction::Instruction(InstructionStreamType& stream, ProcessorM } if (m_descriptor->format == __SSE) { - if (m_rep_prefix == 0xF3) { + if (m_rep_prefix == 0xF2) { + m_descriptor = &s_sse_table_f2[m_sub_op]; + } else if (m_rep_prefix == 0xF3) { m_descriptor = &s_sse_table_f3[m_sub_op]; } else if (m_has_operand_size_override_prefix) { // This was unset while parsing the prefix initially