Skip to content

Potential bug in builtin_rotl/rotr #1504

Closed
@dcodeIO

Description

@dcodeIO

#1494 fixed rotl/rotr for SMIs, but introduced a potential bug during optimization by using arg0 and arg1 twice, in two separate parent expressions. The formula is

(value << (shift & mask)) | (value >>> ((0 - shift) & mask))

indicating that two temporary locals for value and shift will be necessary (with mask being a constant). Pinning this here so we don't forget.

@MaxGraey Do you think we'll need temps here, or is there maybe another approach that works without temps?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions