-
Notifications
You must be signed in to change notification settings - Fork 356
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
Add support for aarch64 platform intrinsics #3172
Comments
I should probably do a version of #2057 for aarch64, all my current surveying is done based on x86-64-v2. |
If there's a straightforward script for it (and you promise it won't destroy my computer :D), I'm happy to do a run on my ARM64 laptop. |
It involves running the tests for every published crate so I feel like you're not up for that :) Also Miri supports cross-interpretation so the host doesn't matter, my big x86_64 CPU will do just fine for this. |
I was thinking maybe I'd just do the first 500 or 1k or something :-) But if your setup already works for it, that sounds good! |
I hacked up https://github.com/saethlin/crater-at-home a bit to set the target to aarch64-unknown-linux-gnu and here's a thousand crates (hosted for now in my dev bucket): https://miri-bot-dev.s3.amazonaws.com/aarch64-1000.tar.xz Missing LLVM intrinsics look like:
Nothing about AES. Do I need a particular |
https://github.com/ogxd/gxhash is what I was playing with when I originally ran into this. https://github.com/RustCrypto/block-ciphers/tree/master/aes uses the same instruction, but goes via inline assembly instead of the intrinsic, for whatever reason. |
In any event, thanks for running these numbers! I'm using an Apple M1, which will have a set of baseline capabilities that I'm not sure is guaranteed for all aarch64 chips. |
Baseline aarch64 does not have the aes feature, but I think here rust-lang/rust#93889 (comment) @workingjubilee says that M1 is |
Sorry I'm just getting started with Miri, but |
Until someone is interested in implementing the aarch64 intrinsics, you can run your code with a different target: |
This problem should just be fixed in stdarch. It links against LLVMIR for aarch64 instruction generation instead of going through |
Oh, these operations have equivalents in |
Yes, all of these at least should be able to be implemented in terms of our already extant intrinsics: @akern40 I realize the spec file is slightly inscrutable but if you can spend the time to puzzle out getting that code to use https://doc.rust-lang.org/nightly/std/intrinsics/simd/fn.simd_fma.html then your problem goes away because Miri already implements |
I opened a stdarch issue about changing their implementation of the aarch64 intrinsics, which indeed would get us a lot of Miri (and cranelift and gcc) support for free: rust-lang/stdarch#1659. |
Thank you both! When I've got a bit more time this weekend I'll try to dig into this and see what I can help contribute. |
Currently this produces:
or
The text was updated successfully, but these errors were encountered: