summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorHendiadyoin1 <leon.a@serenityos.org>2022-04-01 13:50:48 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-02 18:37:38 +0200
commitf951849fd5d720f1302b92623e4f29b8d6f1af2a (patch)
tree212515bc3d2bc320e2669174593c24c22ffdf5bd /Userland
parentd03a6cc6c6e5e2791588f5601403cd94a872bf8c (diff)
downloadserenity-f951849fd5d720f1302b92623e4f29b8d6f1af2a.zip
LibX86: Don't print repz prefix for SSE instructions
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibX86/Instruction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibX86/Instruction.cpp b/Userland/Libraries/LibX86/Instruction.cpp
index acc82b06c1..4dc4d35131 100644
--- a/Userland/Libraries/LibX86/Instruction.cpp
+++ b/Userland/Libraries/LibX86/Instruction.cpp
@@ -1418,7 +1418,8 @@ String Instruction::to_string(u32 origin, SymbolProvider const* symbol_provider,
builder.append(m_o32 ? "o32 " : "o16 ");
if (has_lock_prefix())
builder.append("lock ");
- if (has_rep_prefix())
+ // Note: SSE instructions use these to toggle between packed and single data
+ if (has_rep_prefix() && !(m_descriptor->format > __SSE && m_descriptor->format < __EndFormatsWithRMByte))
builder.append(m_rep_prefix == Prefix::REPNZ ? "repnz " : "repz ");
to_string_internal(builder, origin, symbol_provider, x32);
return builder.to_string();