mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
Expose bpf pseudo load instruction via intrinsic. It is used by front-ends that can encode file descriptors directly into IR instead of relying on relocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233396 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
1.1 KiB
TableGen
25 lines
1.1 KiB
TableGen
//===- IntrinsicsBPF.td - Defines BPF intrinsics -----------*- tablegen -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines all of the BPF-specific intrinsics.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Specialized loads from packet
|
|
let TargetPrefix = "bpf" in { // All intrinsics start with "llvm.bpf."
|
|
def int_bpf_load_byte : GCCBuiltin<"__builtin_bpf_load_byte">,
|
|
Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
|
|
def int_bpf_load_half : GCCBuiltin<"__builtin_bpf_load_half">,
|
|
Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
|
|
def int_bpf_load_word : GCCBuiltin<"__builtin_bpf_load_word">,
|
|
Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
|
|
def int_bpf_pseudo : GCCBuiltin<"__builtin_bpf_pseudo">,
|
|
Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty]>;
|
|
}
|