mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-21 21:33:54 +00:00
Fix MUL ambiguity.
This commit is contained in:
parent
d380cecdb7
commit
15ee84b2eb
@ -408,13 +408,9 @@ struct OperationMapper {
|
||||
// page references are provided were more detailed versions of the
|
||||
// decoding are depicted.
|
||||
|
||||
// Data processing; cf. p.17.
|
||||
if constexpr (((partial >> 26) & 0b11) == 0b00) {
|
||||
scheduler.template perform<i>(DataProcessing(instruction));
|
||||
return;
|
||||
}
|
||||
|
||||
// Multiply and multiply-accumulate (MUL, MLA); cf. p.23.
|
||||
//
|
||||
// This usurps a potential data processing decoding, so needs priority.
|
||||
if constexpr (((partial >> 22) & 0b111'111) == 0b000'000) {
|
||||
// This implementation provides only eight bits baked into the template parameters so
|
||||
// an additional dynamic test is required to check whether this is really, really MUL or MLA.
|
||||
@ -424,6 +420,12 @@ struct OperationMapper {
|
||||
}
|
||||
}
|
||||
|
||||
// Data processing; cf. p.17.
|
||||
if constexpr (((partial >> 26) & 0b11) == 0b00) {
|
||||
scheduler.template perform<i>(DataProcessing(instruction));
|
||||
return;
|
||||
}
|
||||
|
||||
// Single data transfer (LDR, STR); cf. p.25.
|
||||
if constexpr (((partial >> 26) & 0b11) == 0b01) {
|
||||
scheduler.template perform<i>(SingleDataTransfer(instruction));
|
||||
|
@ -702,7 +702,7 @@ class ConcreteMachine:
|
||||
|
||||
static bool log = false;
|
||||
if(log) {
|
||||
logger.info().append("%08x: %08x [r14:%08x]", executor_.pc(), instruction, executor_.registers()[14]);
|
||||
logger.info().append("%08x: %08x [r0:%08x]", executor_.pc(), instruction, executor_.registers()[0]);
|
||||
}
|
||||
InstructionSet::ARM::execute<arm_model>(instruction, executor_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user