mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-21 18:37:11 +00:00
Merge pull request #1489 from TomHarte/MinorExtraStrings
Slightly improve x86 instruction to string lexicon.
This commit is contained in:
commit
9b9cdfe937
@ -30,6 +30,15 @@ enum class AccessType {
|
||||
PreauthorisedRead,
|
||||
};
|
||||
|
||||
constexpr const char *to_string(const AccessType type) {
|
||||
switch(type) {
|
||||
case AccessType::Read: return "read";
|
||||
case AccessType::Write: return "write";
|
||||
case AccessType::ReadModifyWrite: return "read-modify-write";
|
||||
case AccessType::PreauthorisedRead: return "preauthorised read";
|
||||
}
|
||||
}
|
||||
|
||||
constexpr bool is_writeable(const AccessType type) {
|
||||
return type == AccessType::ReadModifyWrite || type == AccessType::Write;
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ std::string InstructionSet::x86::to_string(Operation operation, DataSize size, M
|
||||
|
||||
case Operation::IN: return "in";
|
||||
case Operation::OUT: return "out";
|
||||
case Operation::OUTS: return "outs";
|
||||
|
||||
case Operation::JO: return "jo";
|
||||
case Operation::JNO: return "jno";
|
||||
@ -223,6 +224,7 @@ std::string InstructionSet::x86::to_string(Operation operation, DataSize size, M
|
||||
case Operation::NOP: return "nop";
|
||||
case Operation::POP: return "pop";
|
||||
case Operation::POPF: return "popf";
|
||||
case Operation::PUSHA: return "pusha";
|
||||
case Operation::PUSH: return "push";
|
||||
case Operation::PUSHF: return "pushf";
|
||||
case Operation::RCL: return "rcl";
|
||||
|
Loading…
x
Reference in New Issue
Block a user