Alex Crichton 5a8887b0c0 Add CI for more platforms
This commit adds CI for a few more targets:

* i686-unknown-linux-gnu
* arm-unknown-linux-gnueabihf
* armv7-unknown-linux-gnueabihf
* aarch64-unknown-linux-gnu

The CI here is structured around using a Docker container to set up a test
environment and then QEMU is used to actually execute code from these platforms.
QEMU's emulation actually makes it so we can continue to just use `cargo test`,
as processes can be spawned from QEMU like `objdump` and files can be read (for
libbacktrace). Ends up being a relatively seamless experience!

Note that a number of intrinsics were disabled on i686 because they were failing
tests, and otherwise a few ARM touch-ups were made to get tests passing.
2017-09-21 12:35:46 -07:00

34 lines
892 B
Rust

#![feature(target_feature)]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod example {
extern crate stdsimd;
use std::env;
use self::stdsimd::simd;
#[inline(never)]
#[target_feature = "-sse2"]
fn myop(
(x0, x1, x2, x3): (u64, u64, u64, u64),
(y0, y1, y2, y3): (u64, u64, u64, u64),
) -> (u64, u64, u64, u64) {
let x = simd::u64x4::new(x0, x1, x2, x3);
let y = simd::u64x4::new(y0, y1, y2, y3);
let r = x * y;
(r.extract(0), r.extract(1), r.extract(2), r.extract(3))
}
pub fn main() {
let x = env::args().nth(1).unwrap().parse().unwrap();
let y = env::args().nth(2).unwrap().parse().unwrap();
let r = myop((x, x, x, x), (y, y, y, y));
println!("{:?}", r);
}
}
fn main() {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
example::main();
}