summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibX86/Disassembler.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2022-12-10 20:00:09 +0200
committerAndreas Kling <kling@serenityos.org>2022-12-11 22:06:30 +0100
commit108a8e4c886be9a0a9e1aa53dce8db838b01f4a4 (patch)
treef83db1fbbf213cd56a9d87b573d9302cc7783659 /Userland/Libraries/LibX86/Disassembler.h
parent9a136e354d63c32c2471f473b1fed0cf3db9abde (diff)
downloadserenity-108a8e4c886be9a0a9e1aa53dce8db838b01f4a4.zip
LibX86: Only pass ProcessorMode to Instruction constructor
We previously passed both OperandSize and AddressSize to the constructor. Both values were only ever 32-bit at construction. We used AddressSize::Size64 to signify Long mode which was needlessly complicated.
Diffstat (limited to 'Userland/Libraries/LibX86/Disassembler.h')
-rw-r--r--Userland/Libraries/LibX86/Disassembler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibX86/Disassembler.h b/Userland/Libraries/LibX86/Disassembler.h
index c42695135a..9cc2b998ea 100644
--- a/Userland/Libraries/LibX86/Disassembler.h
+++ b/Userland/Libraries/LibX86/Disassembler.h
@@ -23,10 +23,10 @@ public:
if (!m_stream.can_read())
return {};
#if ARCH(I386)
- return Instruction::from_stream(m_stream, OperandSize::Size32, AddressSize::Size32);
+ return Instruction::from_stream(m_stream, ProcessorMode::Protected);
#else
# if ARCH(X86_64)
- return Instruction::from_stream(m_stream, OperandSize::Size32, AddressSize::Size64);
+ return Instruction::from_stream(m_stream, ProcessorMode::Long);
# else
dbgln("Unsupported platform");
return {};