Skip to content

MOVZ & MOVK #5

@Kyle-Mitchell

Description

@Kyle-Mitchell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions