mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
The test set doesn't seem to do word rotation.
This commit is contained in:
parent
ccdd340c9a
commit
bd62228cc6
@ -313,13 +313,18 @@ struct Executor {
|
|||||||
} else {
|
} else {
|
||||||
did_read = bus.template read<uint32_t>(address, value, registers_.mode(), trans);
|
did_read = bus.template read<uint32_t>(address, value, registers_.mode(), trans);
|
||||||
|
|
||||||
// "An address offset from a word boundary will cause the data to be rotated into the
|
if constexpr (model != Model::ARMv2with32bitAddressing) {
|
||||||
// register so that the addressed byte occuplies bits 0 to 7."
|
// "An address offset from a word boundary will cause the data to be rotated into the
|
||||||
switch(address & 3) {
|
// register so that the addressed byte occuplies bits 0 to 7."
|
||||||
case 0: break;
|
//
|
||||||
case 1: value = (value >> 8) | (value << 24); break;
|
// (though the test set that inspired 'ARMv2with32bitAddressing' appears not to honour this;
|
||||||
case 2: value = (value >> 16) | (value << 16); break;
|
// test below assumes it went away by the version of ARM that set supports)
|
||||||
case 3: value = (value >> 24) | (value << 8); break;
|
switch(address & 3) {
|
||||||
|
case 0: break;
|
||||||
|
case 1: value = (value >> 8) | (value << 24); break;
|
||||||
|
case 2: value = (value >> 16) | (value << 16); break;
|
||||||
|
case 3: value = (value >> 24) | (value << 8); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,6 +381,7 @@ struct MemoryLedger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t r15_mask = 0xffff'ffff;
|
uint32_t r15_mask = 0xffff'ffff;
|
||||||
|
bool ignore_test = false;
|
||||||
switch(instruction) {
|
switch(instruction) {
|
||||||
case 0x03110002:
|
case 0x03110002:
|
||||||
// tsteq r1, #2; per my reading this is LSL#0 so the original
|
// tsteq r1, #2; per my reading this is LSL#0 so the original
|
||||||
@ -395,7 +396,7 @@ struct MemoryLedger {
|
|||||||
// sheet specifically says for a shift-by-register that
|
// sheet specifically says for a shift-by-register that
|
||||||
// "LSL by more than 32 has result zero, carry out zero" so I think
|
// "LSL by more than 32 has result zero, carry out zero" so I think
|
||||||
// the test set is adrift on the following:
|
// the test set is adrift on the following:
|
||||||
if(test_count == 15) continue;
|
ignore_test = test_count == 15 - 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xe090e00f:
|
case 0xe090e00f:
|
||||||
@ -422,6 +423,9 @@ struct MemoryLedger {
|
|||||||
} else {
|
} else {
|
||||||
// Execute test and compare.
|
// Execute test and compare.
|
||||||
++test_count;
|
++test_count;
|
||||||
|
if(ignore_test) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(instruction == 0xe4931000 && test_count == 3) {
|
if(instruction == 0xe4931000 && test_count == 3) {
|
||||||
printf("");
|
printf("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user