Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MOVZ & MOVK #5

Open
Kyle-Mitchell opened this issue Feb 22, 2023 · 1 comment
Open

MOVZ & MOVK #5

Kyle-Mitchell opened this issue Feb 22, 2023 · 1 comment

Comments

@Kyle-Mitchell
Copy link

717 registerFile[destReg] = immediate << quadrantShift;
726 registerFile[destReg] = registerFile[destReg] | (immediate << quadrantShift);

These two lines of code have immediate as int types. This causes issues with the results of MOVK and MOVZ. Some of the observed issues:

MOVZ X1, 0x8000, LSL #16 will result in X1 having a value of 0xffffffff80000000, this is a sign extended result where sign extension should not happen.

MOVZ X1, 0x8000, LSL #32 will result in X1 having a value of 0x8000.

MOVZ X1, 0x8000, LSL #48 will result in X1 having a value of 0xffffffff80000000, this is wrong in sign and distance.

I can not suggest a fix as I do not have a Java build environment handy.

@simdeistud
Copy link

@Kyle-Mitchell if you are still interested in knowing how to build this project and make the changes yourself I have uploaded a tutorial in this pull request #7

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants