mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-30 11:34:54 +00:00
Simplify roll/shift case.
This commit is contained in:
parent
f6fd49d950
commit
6597283c34
@ -530,12 +530,7 @@ std::string InstructionSet::x86::to_string(
|
|||||||
case Operation::SAL: case Operation::SAR:
|
case Operation::SAL: case Operation::SAR:
|
||||||
case Operation::SHR:
|
case Operation::SHR:
|
||||||
case Operation::SETMO: case Operation::SETMOC:
|
case Operation::SETMO: case Operation::SETMOC:
|
||||||
const int operands = max_displayed_operands(instruction.operation);
|
|
||||||
const bool displacement = has_displacement(instruction.operation);
|
|
||||||
if(operands > 1) {
|
|
||||||
operation += to_string(instruction.destination(), instruction, offset_length, immediate_length);
|
operation += to_string(instruction.destination(), instruction, offset_length, immediate_length);
|
||||||
}
|
|
||||||
if(operands > 0) {
|
|
||||||
switch(instruction.source().source()) {
|
switch(instruction.source().source()) {
|
||||||
case Source::None: break;
|
case Source::None: break;
|
||||||
case Source::eCX: operation += ", cl"; break;
|
case Source::eCX: operation += ", cl"; break;
|
||||||
@ -549,10 +544,6 @@ std::string InstructionSet::x86::to_string(
|
|||||||
operation += to_string(instruction.source(), instruction, offset_length, immediate_length);
|
operation += to_string(instruction.source(), instruction, offset_length, immediate_length);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(displacement) {
|
|
||||||
operation += to_hex(instruction.displacement(), offset_length);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user