brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · d8b5172 Raw
36 lines · plain
1; RUN: llc -mtriple=bpf -mcpu=v3 < %s | FileCheck %s2;3; Source code:4;   void foo(int, int, int, long, int);5;   int test(int a, int b, int c, long d, int e) {6;     foo(a, b, c, d, e);7;     __asm__ __volatile__ ("":::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "memory");8;     foo(a, b, c, d, e);9;     return 0;10;   }11; Compilation flag:12;   clang -target bpf -S -emit-llvm -O2 -mcpu=v3 t.c13 14; Function Attrs: nounwind15define dso_local i32 @test(i32 %a, i32 %b, i32 %c, i64 %d, i32 %e) local_unnamed_addr #0 {16entry:17  tail call void @foo(i32 %a, i32 %b, i32 %c, i64 %d, i32 %e) #218  tail call void asm sideeffect "", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{memory}"() #219 20; CHECK:        *(u32 *)(r10 - 8) = w521; CHECK:        *(u64 *)(r10 - 16) = r422; CHECK:        *(u32 *)(r10 - 24) = w323; CHECK:        *(u32 *)(r10 - 32) = w224; CHECK:        *(u32 *)(r10 - 40) = w125; CHECK:        call foo26 27  tail call void @foo(i32 %a, i32 %b, i32 %c, i64 %d, i32 %e) #228  ret i32 029}30 31declare dso_local void @foo(i32, i32, i32, i64, i32) local_unnamed_addr #132 33attributes #0 = { nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }34attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="v3" }35attributes #2 = { nounwind }36