From e5cde0082a64ae375615d94c69a4c4554dc1e0ad Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Apr 2020 13:23:59 +0200 Subject: [PATCH] LibX86: Run the instruction decoder in 32-bit mode by default Let's assume a 32-bit execution environment unless otherwise specified. --- Libraries/LibX86/Instruction.h | 2 +- Userland/disasm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibX86/Instruction.h b/Libraries/LibX86/Instruction.h index ed6642d393..10eddac2bc 100644 --- a/Libraries/LibX86/Instruction.h +++ b/Libraries/LibX86/Instruction.h @@ -319,7 +319,7 @@ public: u8 cc() const { return m_has_sub_op ? m_sub_op & 0xf : m_op & 0xf; } - String to_string(u32 origin, bool x32) const; + String to_string(u32 origin, bool x32 = true) const; private: Instruction(InstructionStream&, bool o32, bool a32); diff --git a/Userland/disasm.cpp b/Userland/disasm.cpp index ab6cfe48bf..6b00f3cc39 100644 --- a/Userland/disasm.cpp +++ b/Userland/disasm.cpp @@ -20,7 +20,7 @@ int main(int argc, char** argv) auto insn = disassembler.next(); if (!insn.has_value()) break; - out() << String::format("%08x", offset) << " " << insn.value().to_string(offset, true); + out() << String::format("%08x", offset) << " " << insn.value().to_string(offset); } return 0;