Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

aarch64: Fix lowering amounts for shifts #3074

Merged
merged 1 commit into from
Jul 16, 2021

Commits on Jul 15, 2021

  1. aarch64: Fix lowering amounts for shifts

    This commit addresses two issues:
    * A panic when shifting any non i128 type by i128 amounts (bytecodealliance#3064)
    * Wrong results when lowering shifts with small types (i8, i16)
    
    In these types when shifting for amounts larger than the size of the
    type, we would not get the wrapping behaviour that we see on i32 and i64.
    This is because in these larger types, the wrapping behaviour is automatically
    implemented by using the appropriate instruction, however we do not
    have i8 and i16 specific instructions, so we have to manually wrap
    the shift amount with an AND instruction.
    
    This issue is also found on x86_64 and s390x, and a separate issue will
    be filed for those.
    
    Closes bytecodealliance#3064
    afonso360 committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    0f2618b View commit details
    Browse the repository at this point in the history