Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M mu-impl-fast
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • mumu
  • mu-impl-fast
  • Issues
  • #23
Closed
Open
Issue created May 01, 2017 by Yi Lin@u4776528Owner

[x86_64] shift operations may return wrong result if 2nd operand is larger than int8

Shifting instructions in Mu require two operands of the same size, e.g. Shl <int64> a b, in which a and b are both int64.

However shl, shr, sar in x86_64 either takes a second operand in the CL register (8 bits), or as a 8bits immediate. Current the instruction selector simply moves lower 8bits of b into CL, which may result in incorrect result.

Assignee
Assign to
Time tracking