From b2a6967114b2fa9d477226ff7ad53fb55fb692bc Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Tue, 20 Apr 2021 19:03:10 +1000 Subject: Add support for BPF inline assembly --- compiler/rustc_codegen_ssa/src/target_features.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 98d550d732f..b10de567744 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -210,6 +210,8 @@ const WASM_ALLOWED_FEATURES: &[(&str, Option)] = &[ ("nontrapping-fptoint", Some(sym::wasm_target_feature)), ]; +const BPF_ALLOWED_FEATURES: &[(&str, Option)] = &[("alu32", Some(sym::bpf_target_feature))]; + /// When rustdoc is running, provide a list of all known features so that all their respective /// primitives may be documented. /// @@ -224,6 +226,7 @@ pub fn all_known_features() -> impl Iterator &'static [(&'static str, Opt "powerpc" | "powerpc64" => POWERPC_ALLOWED_FEATURES, "riscv32" | "riscv64" => RISCV_ALLOWED_FEATURES, "wasm32" | "wasm64" => WASM_ALLOWED_FEATURES, + "bpf" => BPF_ALLOWED_FEATURES, _ => &[], } } -- cgit 1.4.1-3-g733a5