brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · f1b957d Raw
44 lines · plain
1; RUN: llc -mtriple=bpfel -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s2 3%struct.bpf_context = type { i64, i64, i64, i64, i64, i64, i64 }4%struct.sk_buff = type { i64, i64, i64, i64, i64, i64, i64 }5%struct.net_device = type { i64, i64, i64, i64, i64, i64, i64 }6 7@bpf_prog1.devname = private unnamed_addr constant [3 x i8] c"lo\00", align 18@bpf_prog1.fmt = private unnamed_addr constant [15 x i8] c"skb %x dev %x\0A\00", align 19 10; Function Attrs: norecurse11define i32 @bpf_prog1(ptr nocapture %ctx) #0 section "events/net/netif_receive_skb" {12  %devname = alloca [3 x i8], align 113  %fmt = alloca [15 x i8], align 114  %1 = getelementptr inbounds [3 x i8], ptr %devname, i64 0, i64 015  call void @llvm.memcpy.p0.p0.i64(ptr %1, ptr @bpf_prog1.devname, i64 3, i1 false)16  %2 = getelementptr inbounds %struct.bpf_context, ptr %ctx, i64 0, i32 017  %3 = load i64, ptr %2, align 818  %4 = inttoptr i64 %3 to ptr19  %5 = getelementptr inbounds %struct.sk_buff, ptr %4, i64 0, i32 220  %6 = bitcast ptr %5 to ptr21  %7 = call ptr inttoptr (i64 4 to ptr)(ptr %6) #122  %8 = call i32 inttoptr (i64 9 to ptr)(ptr %7, ptr %1, i32 2) #123  %9 = icmp eq i32 %8, 024  br i1 %9, label %10, label %1325 26; <label>:10                                      ; preds = %027  %11 = getelementptr inbounds [15 x i8], ptr %fmt, i64 0, i64 028  call void @llvm.memcpy.p0.p0.i64(ptr %11, ptr @bpf_prog1.fmt, i64 15, i1 false)29  %12 = call i32 (ptr, i32, ...) inttoptr (i64 11 to ptr)(ptr %11, i32 15, ptr %4, ptr %7) #130  br label %1331 32; <label>:13                                      ; preds = %10, %033  ret i32 034 35; CHECK-RELOC: file format elf64-bpf36; CHECK-RELOC: RELOCATION RECORDS FOR [.eh_frame]:37; CHECK-RELOC: R_BPF_64_ABS64 events/net/netif_receive_skb38}39 40; Function Attrs: nounwind41declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) #142 43attributes #0 = { norecurse }44