huonw / simd

[DEPRECATED] see:
http://github.com/rust-lang-nursery/simd
Apache License 2.0
82 stars 18 forks source link

Compilation fails: Intrinsic argument has wrong type #10

Closed hawkw closed 9 years ago

hawkw commented 9 years ago

When trying to build a crate depending on simd:

$ cargo build 
Updating git repository `https://github.com/huonw/simd`
Compiling simd v0.1.0 (https://github.com/huonw/simd#be424212)
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35:5: 35:56 error: intrinsic argument 1 has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35     fn x86_mm_mulhi_epi16(x: i16x8, y: i16x8) -> i16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35:5: 35:56 error: intrinsic argument 2 has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35     fn x86_mm_mulhi_epi16(x: i16x8, y: i16x8) -> i16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35:5: 35:56 error: intrinsic return value has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:35     fn x86_mm_mulhi_epi16(x: i16x8, y: i16x8) -> i16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36:5: 36:56 error: intrinsic argument 1 has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36     fn x86_mm_mulhi_epu16(x: u16x8, y: u16x8) -> u16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36:5: 36:56 error: intrinsic argument 2 has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36     fn x86_mm_mulhi_epu16(x: u16x8, y: u16x8) -> u16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36:5: 36:56 error: intrinsic return value has wrong type: found vector with length 8, expected length 16 [E0442]
/Users/hawk/.cargo/git/checkouts/simd-c969d6c7ccadf1f0/master/src/x86/sse2.rs:36     fn x86_mm_mulhi_epu16(x: u16x8, y: u16x8) -> u16x8;
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 6 previous errors
Could not compile `simd`.

Using rustc v1.4.0 on Mac OS X 10.10.5 (2.5GHz i7 CPU).

$ rustc --version
rustc 1.4.0-nightly (fe9cef7da 2015-08-30)
huonw commented 9 years ago

I've been tweaking and improving the compiler progressively, and simd has been tracking the changes, but if you're pinned to an older version of simd, or are using an older compiler, the mismatch may cause errors like this. The former should be fixed with a cargo update and the latter will just need a rustc update.

Thanks for filing nonetheless, and if upgrading things doesn't resolve it (or you have problems) be sure to just ask.

hawkw commented 9 years ago

Ah, yeah, this is entirely my fault. I thought my version of the compiler was up to date, but apparently I hadn't updated it for several days. Whoops, sorry for bugging you.