stdarch icon indicating copy to clipboard operation
stdarch copied to clipboard

assert_instr fails when using lld as a linker on linux

Open gnzlbg opened this issue 6 years ago • 2 comments

See https://github.com/rust-lang-nursery/packed_simd/issues/144 .

gnzlbg avatar Sep 10 '18 09:09 gnzlbg

During implementation of the vmvn_s8 ARM Neon intrinsic, I think I ran into some variant of this issue.

Codegen tests initiated with:

RUSTFLAGS="-C target-feature=+v7,+neon" TARGET=armv7-unknown-linux-gnueabihf cargo +nightly test --release -p core_arch

on a Raspberry Pi 3 B+ I get:

test result: FAILED. 197 passed; 52 failed; 0 ignored; 0 measured; 0 filtered out

Among the 52 failed tests is my new assert_vmvn_s8_vmvn which failed like so:

---- core_arch::arm::neon::assert_vmvn_s8_vmvn stdout ----
disassembly for vrsqrte_f32_shim_vrsqrte: 
	 0: ldr r0, [pc, #24] ; 10b00 <vrsqrte_f32_shim_vrsqrte+0x20> 
	 1: vrsqrte.f32 d0, d0 
	 2: ldr r2, [pc, #20] ; 10b04 <vrsqrte_f32_shim_vrsqrte+0x24> 
	 3: mov r1, #50 ; 0x32 
	 4: add r0, pc, r0 
	 5: ldr r2, [pc, r2] 
	 6: stm r2, {r0, r1} 
	 7: bx lr 
	 8: .word 0x0008a235 
	 9: .word 0x000b52cc 
thread 'core_arch::arm::neon::assert_vmvn_s8_vmvn' panicked at 'failed to find instruction `vmvn` in the disassembly', crates/stdsimd-test/src/lib.rs:180:9

This looks like if it was checking the wrong function for the vmvn instruction.

jmaibaum avatar Jun 29 '19 16:06 jmaibaum

Yep, all of this broke on master during the 3 weeks that the library did not build.

gnzlbg avatar Jun 29 '19 16:06 gnzlbg