Skip to content

Commit 969a668

Browse files
committed
[WIP]
1 parent 5fa1792 commit 969a668

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gen_intrinsics/src/def_visitor.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use syn::Ident;
12
use syn::parse::Parser;
23
use syn::visit::Visit;
3-
use syn::Ident;
44

55
pub fn parse(target: &str) -> DefVisitor {
66
println!("Running rustc -Zunpretty=expanded --edition=2021 core_arch/src/lib.rs ...");
@@ -121,6 +121,18 @@ impl<'ast> Visit<'ast> for DefVisitor {
121121
_ => {}
122122
}
123123

124+
if sig.inputs.iter().any(|arg| {
125+
let syn::FnArg::Typed(syn::PatType { ref ty, .. }) = arg else {
126+
return false;
127+
};
128+
let syn::Type::Path(ref ty_path) = **ty else {
129+
return false;
130+
};
131+
ty_path.path.is_ident("f16") || ty_path.path.is_ident("f128")
132+
}) {
133+
continue 'items;
134+
}
135+
124136
// FIXME remove this skipping
125137
match &*link_name {
126138
_ if link_name.starts_with("llvm.aarch64.neon.ld") => continue 'items,

gen_intrinsics/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::def_visitor::{DefVisitor, LlvmIntrinsicDef};
1111
fn compile_object(visitor: &DefVisitor) {
1212
let mut ts = proc_macro2::TokenStream::new();
1313
ts.extend(quote::quote! {
14-
#![feature(abi_unadjusted, link_llvm_intrinsics, repr_simd, simd_ffi)]
14+
#![feature(abi_unadjusted, f16, f128, link_llvm_intrinsics, repr_simd, simd_ffi)]
1515
#![allow(dead_code, improper_ctypes, improper_ctypes_definitions, internal_features, non_camel_case_types)]
1616
});
1717

0 commit comments

Comments
 (0)