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

Use a shorter insruction on x86 for loading unsigned 32-bit immediates into 64-bit registers. #487

Merged
merged 1 commit into from
Apr 5, 2023

Commits on Apr 4, 2023

  1. Use a shorter insruction on x86 for loading unsigned 32-bit immediate…

    …s into 64-bit registers.
    
    Writing into a 32-bit register erases the upper 32 bits of a 64-bit
    register. This is the shortest instruction for loading unsigned
    32-bit immediates. The length of those instructions is:
    - movl: 5 bytes
    - movq: 7 bytes
    - movabsq: 10 bytes
    
    Note: Most assemblers will choose the proper instruction by themselves;
    this commit just makes this explicit.
    valoran-M committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    a5203fb View commit details
    Browse the repository at this point in the history