summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/BPF/cc_args.ll
diff options
context:
space:
mode:
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-01-17 07:26:17 +0000
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>2017-01-17 07:26:17 +0000
commite4975487f53110b32bca15878407dc1549ac4b74 (patch)
treeb9b4f289cb462b06f9e7e97e07a21e6e2464defc /llvm/test/CodeGen/BPF/cc_args.ll
parentc0857a40e7976c06612ab8f4a5335e99eab3f4ff (diff)
downloadbcm5719-llvm-e4975487f53110b32bca15878407dc1549ac4b74.tar.gz
bcm5719-llvm-e4975487f53110b32bca15878407dc1549ac4b74.zip
[bpf] error when unknown bpf helper is called
Emit error when BPF backend sees a call to a global function or to an external symbol. The kernel verifier only allows calls to predefined helpers from bpf.h which are defined in 'enum bpf_func_id'. Such calls in assembler must look like 'call [1-9]+' where number matches bpf_func_id. Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 292204
Diffstat (limited to 'llvm/test/CodeGen/BPF/cc_args.ll')
-rw-r--r--llvm/test/CodeGen/BPF/cc_args.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/BPF/cc_args.ll b/llvm/test/CodeGen/BPF/cc_args.ll
index 4ad7a22c7e2..a2ac03f0da1 100644
--- a/llvm/test/CodeGen/BPF/cc_args.ll
+++ b/llvm/test/CodeGen/BPF/cc_args.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=bpfel -show-mc-encoding | FileCheck %s
+; RUN: not llc < %s -march=bpfel -show-mc-encoding | FileCheck %s
define void @test() #0 {
entry:
OpenPOWER on IntegriCloud