Alex Crichton 9ab261c3d7
Implement automatic verification for ARM/AArch64 intrinsics (#626)
This commit implements automatic verification of implement ARM/AArch64
intrinsics. Or it's at least a start! This downloads a snapshot of ARM's
[online documentation][docs] and implements necessary logic to parse
that and use it to verify all the intrinsics. Almost everything
checked out A-OK but a few minor tweaks were needed to the neon
intrinsics and the crc ones needed some renaming.

[docs]: https://developer.arm.com/technologies/neon/intrinsics
2018-12-20 14:11:26 -06:00

27 lines
716 B
Rust

use std::path::Path;
fn main() {
let dir = Path::new(env!("CARGO_MANIFEST_DIR"));
let root = dir.parent().unwrap();
walk(&root.join("../coresimd/x86"));
walk(&root.join("../coresimd/x86_64"));
walk(&root.join("../coresimd/arm"));
walk(&root.join("../coresimd/aarch64"));
}
fn walk(root: &Path) {
for file in root.read_dir().unwrap() {
let file = file.unwrap();
if file.file_type().unwrap().is_dir() {
walk(&file.path());
continue;
}
let path = file.path();
if path.extension().and_then(|s| s.to_str()) != Some("rs") {
continue;
}
println!("cargo:rerun-if-changed={}", path.display());
}
}