Closed AlessioC31 closed 1 year ago
Base: 48.20% // Head: 46.88% // Decreases project coverage by -1.31%
:warning:
Coverage data is based on head (
a30654a
) compared to base (91cf3bc
). Patch coverage: 1.81% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Mostly LGTM, I don't understand if for reading PC we should read 32 bit with first (and in case second) to 0 or if we should read only other 31 (or in case 30)
Mostly LGTM, I don't understand if for reading PC we should read 32 bit with first (and in case second) to 0 or if we should read only other 31 (or in case 30)
That's a good question, I don't know :)
But I think we should read 32 bits and have the last/latest two to 0. This is because this is from the fact that instructions are word/halfword aligned (arm/thumb), so for example when we access an ARM instruction we will always have the latest two bits to 0. If we take the bits 2-31
as a PC to access the memory, we would still have the problem that this address may have the latest two bits != 0b00
, so it would be possible for it to read instructions not word-aligned. So I think we should use the full 32 bits as the address of the instruction, but always setting the latest two bits/one bit to 0.
Make sense also to me :)
CpuState
was using the inverted logicBX
was not reading the value fromRn