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

Support RISC-V unaligned-scalar-mem target feature #110884

Merged
merged 1 commit into from
May 18, 2023

Commits on Apr 27, 2023

  1. Support RISC-V unaligned-scalar-mem target feature

    This adds `unaligned-scalar-mem` as an allowed RISC-V target feature.
    Some RISC-V cores support unaligned access to memory without trapping.
    On such cores, the compiler could significantly improve code-size and
    performance when using functions like core::ptr::read_unaligned<u32>
    by emitting a single load or store instruction with an unaligned
    address, rather than a long sequence of byte load/store/bitmanip
    instructions.
    
    Enabling the `unaligned-scalar-mem` target feature allows LLVM to do
    this optimization.
    
    Fixes rust-lang#110883
    korran committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    08f7e32 View commit details
    Browse the repository at this point in the history