Hi,
I'm trying to run coverage tests on my bpf program and it compiles fails.
I guess BPF does not support '--coverage' flags?
root@boxes:~/ovs# clang-4.0 -Wstrict-prototypes -Wall -Wextra
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security
-Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool
-Wlogical-not-parentheses -Wsizeof-array-argument --coverage
-D__NR_CPUS__=4 -O2 -Wall -Werror -emit-llvm -I./include -I./include
-Wno-error=pointer-arith -I/include/uapi/ -c bpf/datapath.c -o - |
llc-4.0 -march=bpf -filetype=obj -o bpf/datapath.o
LLVM ERROR: Cannot select: 0x8b2e90: ch,glue = BPFISD::CALL 0x8b2f60,
TargetExternalSymbol:i64'memset', Register:i64 %R1, Register:i64 %R2,
Register:i64 %R3, 0x8b2f60:1
0x8b2ef8: i64 = TargetExternalSymbol'memset'
0x8b3168: i64 = Register %R1
0x8b3098: i64 = Register %R2
0x8b2fc8: i64 = Register %R3
0x8b2f60: ch,glue = CopyToReg 0x8b3030, Register:i64 %R3,
Constant:i64<1408>, 0x8b3030:1
0x8b2fc8: i64 = Register %R3
0x8b3308: i64 = Constant<1408>
0x8b3030: ch,glue = CopyToReg 0x8b3100, Register:i64 %R2,
Constant:i64<0>, 0x8b3100:1
0x8b3098: i64 = Register %R2
0x8b3238: i64 = Constant<0>
0x8b3100: ch,glue = CopyToReg 0x8b31d0, Register:i64 %R1, 0x73f0f8
0x8b3168: i64 = Register %R1
0x73f0f8: i64 = BPFISD::Wrapper TargetGlobalAddress:i64<[176 x
i64]* @__llvm_gcov_ctr> 0
0x8b2cb8: i64 = TargetGlobalAddress<[176 x i64]* @__llvm_gcov_ctr> 0
In function: __llvm_gcov_flush
Thanks
William