brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 05af4f3 Raw
65 lines · plain
1; RUN: llc < %s -mtriple=bpfel -mcpu=v1 | FileCheck -check-prefixes=CHECK,EL %s2; RUN: llc < %s -mtriple=bpfeb -mcpu=v1 | FileCheck -check-prefixes=CHECK,EB %s3 4%struct.bpf_map_def = type { i32, i32, i32, i32 }5%struct.__sk_buff = type opaque6%struct.routing_key_2 = type { [6 x i8] }7 8@routing = global %struct.bpf_map_def { i32 1, i32 6, i32 12, i32 1024 }, section "maps", align 49@routing_miss_0 = global %struct.bpf_map_def { i32 1, i32 1, i32 12, i32 1 }, section "maps", align 410@test1 = global %struct.bpf_map_def { i32 2, i32 4, i32 8, i32 1024 }, section "maps", align 411@test1_miss_4 = global %struct.bpf_map_def { i32 2, i32 1, i32 8, i32 1 }, section "maps", align 412@_license = global [4 x i8] c"GPL\00", section "license", align 113@llvm.used = appending global [6 x ptr] [ptr @_license, ptr @ebpf_filter, ptr @routing, ptr @routing_miss_0, ptr @test1, ptr @test1_miss_4], section "llvm.metadata"14 15; Function Attrs: nounwind uwtable16define i32 @ebpf_filter(ptr nocapture readnone %ebpf_packet) #0 section "socket1" {17 18; EL: r1 = 11033905661445 ll19; EB: r1 = 361984551142686720 ll20; CHECK: *(u64 *)(r10 - 8) = r121 22; CHECK: r1 = 023; CHECK-DAG: *(u16 *)(r10 + 24) = r124; CHECK-DAG: *(u16 *)(r10 + 22) = r125; CHECK-DAG: *(u16 *)(r10 + 20) = r126; CHECK-DAG: *(u16 *)(r10 + 18) = r127; CHECK-DAG: *(u16 *)(r10 + 16) = r128; CHECK-DAG: *(u16 *)(r10 + 14) = r129; CHECK-DAG: *(u16 *)(r10 + 12) = r130; CHECK-DAG: *(u16 *)(r10 + 10) = r131; CHECK-DAG: *(u16 *)(r10 + 8) = r132; CHECK-DAG: *(u16 *)(r10 + 6) = r133; CHECK-DAG: *(u16 *)(r10 + 4) = r134; CHECK-DAG: *(u16 *)(r10 + 2) = r135; CHECK-DAG: *(u16 *)(r10 + 0) = r136; CHECK-DAG: *(u16 *)(r10 + 26) = r137 38; CHECK: r2 = r1039; CHECK: r2 += -840; CHECK: r1 = routing41; CHECK: call bpf_map_lookup_elem42; CHECK: exit43  %key = alloca %struct.routing_key_2, align 844  store i8 5, ptr %key, align 145  %1 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 0, i32 0, i64 146  store i8 6, ptr %1, align 147  %2 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 0, i32 0, i64 248  store i8 7, ptr %2, align 149  %3 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 0, i32 0, i64 350  store i8 8, ptr %3, align 151  %4 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 0, i32 0, i64 452  store i8 9, ptr %4, align 153  %5 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 0, i32 0, i64 554  store i8 10, ptr %5, align 155  %6 = getelementptr inbounds %struct.routing_key_2, ptr %key, i64 1, i32 0, i64 056  call void @llvm.memset.p0.i64(ptr %6, i8 0, i64 30, i1 false)57  %7 = call i32 (ptr, ptr, ...) @bpf_map_lookup_elem(ptr nonnull @routing, ptr nonnull %key) #358  ret i32 undef59}60 61; Function Attrs: nounwind argmemonly62declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) #163 64declare i32 @bpf_map_lookup_elem(...) #265