From f1c486401634b9a9e0f68c0bec940ee971eadb85 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 12 Mar 2022 11:37:21 -0500 Subject: [PATCH] Eliminate INSD. --- InstructionSets/x86/Decoder.cpp | 4 ++-- InstructionSets/x86/Instruction.hpp | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/InstructionSets/x86/Decoder.cpp b/InstructionSets/x86/Decoder.cpp index 58e7f01b7..bcd657a96 100644 --- a/InstructionSets/x86/Decoder.cpp +++ b/InstructionSets/x86/Decoder.cpp @@ -244,7 +244,7 @@ std::pair::InstructionT> Decoder::decode(con RequiresMin(i80186); Complete(INS, None, None, DataSize::Byte); break; - case 0x6d: // INSW + case 0x6d: // INSW/INSD RequiresMin(i80186); Complete(INS, None, None, data_size_); break; @@ -252,7 +252,7 @@ std::pair::InstructionT> Decoder::decode(con RequiresMin(i80186); Complete(OUTS, None, None, DataSize::Byte); break; - case 0x6f: // OUTSW + case 0x6f: // OUTSW/OUSD RequiresMin(i80186); Complete(OUTS, None, None, data_size_); break; diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index 75ecfe73b..8cf45a768 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -88,7 +88,7 @@ enum class Operation: uint8_t { /// Far call; see the segment() and offset() fields. CALLfar, - /// Displacement call; followed by a 16-bit operand providing a call offset. + /// Relative call; see displacement(). CALLrel, /// Near call. CALLabs, @@ -216,11 +216,12 @@ enum class Operation: uint8_t { /// Procedure exit; copies BP to SP, then pops a new BP from the stack. LEAVE, - // TODO: expand detail on all operations below. - - /// Inputs from a port, incrementing or decrementing the destination. + /// Inputs a byte, word or double word from the port specified by DX, writing it to + /// ES:[e]DI and incrementing or decrementing [e]DI as per the + /// current EFLAGS DF flag. INS, - /// Outputs to a port, incrementing or decrementing the destination. + /// Outputs a byte, word or double word from ES:[e]DI to the port specified by DX, + /// incrementing or decrementing [e]DI as per the current EFLAGS DF flag.] OUTS, /// Pushes all general purpose registers to the stack, in the order: @@ -234,6 +235,8 @@ enum class Operation: uint8_t { // 80286 additions. // + // TODO: expand detail on all operations below. + /// Adjusts requested privilege level. ARPL, /// Clears the task-switched flag. @@ -312,11 +315,6 @@ enum class Operation: uint8_t { /// [Early 80386s only] Insert bit string. IBTS, - /// Inputs a double word the port specified by DX, writing it to - /// ES:[e]DI and incrementing or decrementing [e]DI as per the - /// current EFLAGS DF flag. - INSD, - /// Convert dword to qword; fills EDX with the sign bit of EAX. CDQ, /// Convert word to dword; AX will be expanded to fill EAX.