add vldx neon instructions#1200
Conversation
|
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
| "unadjusted" | ||
| } else { | ||
| "C" | ||
| }; |
There was a problem hiding this comment.
I think we would want to always use "unadjusted" when linking with LLVM intrinsics, unless I'm missing something?
There was a problem hiding this comment.
I'm not sure if these links depend on "C" Abi, especially other architectures, like x86. In view of the fact that most of the structs are marked by #[repr(simd)], the difference in Abi should only affect the structs containing multiple vectors IMO. Let's try it.
There was a problem hiding this comment.
Using "unadjusted" looks fine, at least for arm/aarch64. It also slightly simplifies the compilation process, so I think it makes sense.
A few assert_instrs of some instructions using simd_extract need to be correct, I think this may be due to some updates to the nightly compiler
| #[rustc_legacy_const_generics(1)] | ||
| #[cfg_attr(all(test, target_arch = "arm"), assert_instr("vmov.32", IMM5 = 1))] | ||
| #[cfg_attr(all(test, target_arch = "arm"), assert_instr("vmov", IMM5 = 1))] | ||
| #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(mov, IMM5 = 1))] |
There was a problem hiding this comment.
I think for these we should just use assert_instr(nop, ...). nop is handled specially and accepts any instruction.
There was a problem hiding this comment.
It makes sense. We should not care about the specific implementation of simd_extract here. So I replaced with "nop" for vget instructions.
| #[cfg_attr(all(test, target_arch = "arm"), assert_instr("nop", IMM5 = 1))] | ||
| #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, IMM5 = 1))] |
There was a problem hiding this comment.
| #[cfg_attr(all(test, target_arch = "arm"), assert_instr("nop", IMM5 = 1))] | |
| #[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, IMM5 = 1))] | |
| #[cfg_attr(test, assert_instr(nop, IMM5 = 1))] |
There was a problem hiding this comment.
Thanks, I have made the corresponding changes.
I think I can submit a new PR later to correct all assert_instr in arm/aarch64 mod.
This PR adds vld1 neon intruscions which read multiple vectors at once.
Fixes #1143