gcc/testsuite/gcc.target/bpf/helper-bind.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=gnu99 -ffreestanding" } */ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | int bpf_bind (void *ctx, void *addr, int addr_len) |
| 7 | __attribute__((kernel_helper(64))); |
| 8 | |
| 9 | void |
| 10 | foo () |
| 11 | { |
| 12 | int ret; |
| 13 | void *ctx, *addr; |
| 14 | int addr_len; |
| 15 | |
| 16 | ret = bpf_bind (ctx, addr, addr_len); |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-assembler "call\t64" } } */ |