1//===- IntrinsicsBPF.td - Defines BPF intrinsics -----------*- tablegen -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines all of the BPF-specific intrinsics. 11// 12//===----------------------------------------------------------------------===// 13 14// Specialized loads from packet 15let TargetPrefix = "bpf" in { // All intrinsics start with "llvm.bpf." 16 def int_bpf_load_byte : GCCBuiltin<"__builtin_bpf_load_byte">, 17 Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; 18 def int_bpf_load_half : GCCBuiltin<"__builtin_bpf_load_half">, 19 Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; 20 def int_bpf_load_word : GCCBuiltin<"__builtin_bpf_load_word">, 21 Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; 22 def int_bpf_pseudo : GCCBuiltin<"__builtin_bpf_pseudo">, 23 Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty]>; 24} 25