1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Complete 8086 operation list; standardise enum order.

This commit is contained in:
Thomas Harte 2023-09-18 16:25:04 -04:00
parent 710017ada2
commit da953fdf0d
2 changed files with 18 additions and 9 deletions

View File

@ -58,8 +58,15 @@ std::string InstructionSet::x86::to_string(Operation operation, DataSize size) {
case Operation::JLE: return "jle"; case Operation::JLE: return "jle";
case Operation::JNLE: return "jnle"; case Operation::JNLE: return "jnle";
case Operation::CALLabs: return "call word";
case Operation::CALLrel: return "call";
case Operation::CALLfar: return "callf word";
case Operation::IRET: return "iret"; case Operation::IRET: return "iret";
case Operation::RETfar: return "retf";
case Operation::RETnear: return "retn";
case Operation::JMPabs: return "jmp word"; case Operation::JMPabs: return "jmp word";
case Operation::JMPrel: return "jmp";
case Operation::JMPfar: return "jmpf word";
case Operation::JPCX: return "jpcx"; case Operation::JPCX: return "jpcx";
case Operation::INT: return "int"; case Operation::INT: return "int";
case Operation::INTO: return "into"; case Operation::INTO: return "into";
@ -116,6 +123,8 @@ std::string InstructionSet::x86::to_string(Operation operation, DataSize size) {
case Operation::XCHG: return "xchg"; case Operation::XCHG: return "xchg";
case Operation::XLAT: return "xlat"; case Operation::XLAT: return "xlat";
case Operation::Invalid: return "invalid";
default: default:
assert(false); assert(false);
} }

View File

@ -90,12 +90,12 @@ enum class Operation: uint8_t {
JO, JNO, JB, JNB, JE, JNE, JBE, JNBE, JO, JNO, JB, JNB, JE, JNE, JBE, JNBE,
JS, JNS, JP, JNP, JL, JNL, JLE, JNLE, JS, JNS, JP, JNP, JL, JNL, JLE, JNLE,
/// Far call; see the segment() and offset() fields.
CALLfar,
/// Relative call; see displacement().
CALLrel,
/// Near call. /// Near call.
CALLabs, CALLabs,
/// Relative call; see displacement().
CALLrel,
/// Far call; see the segment() and offset() fields.
CALLfar,
/// Return from interrupt. /// Return from interrupt.
IRET, IRET,
/// Near return; if source is not ::None then it will be an ::Immediate indicating how many additional bytes to remove from the stack. /// Near return; if source is not ::None then it will be an ::Immediate indicating how many additional bytes to remove from the stack.