Skip to content

Unexpected alignment error #701

Answered by lupino3
euro-phd asked this question in Q&A
Aug 28, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @euro-phd, thanks a lot for raising this issue!

I think that in this case EduMIPS64 deals with misaligned load instructions correctly.
If you look at the the MIPS64 ISA documentation (https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MIPS_Architecture_MIPS64_InstructionSet_%20AFP_P_MD00087_06.05.pdf), you'll see that LD requires the operand to be aligned to 8 bytes. (we implemented this before release 6)

When we implemented load/store, we also saw that there were patents for handling non-aligned memory accesses, so we decided to only support aligned memory accesses. See #2.

In your example, given that the memory is empty, is there a chance you can run

ld r1, 72(r0)

or

ld r1…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lupino3
Comment options

Answer selected by euro-phd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants