Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: test/NaCl/PNaClABI/intrinsics.ll

Issue 14670017: Start a whitelist of intrinsics for the PNaCl ABI checker. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: comment Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Analysis/NaCl/PNaClABIVerifyModule.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 < %s | FileCheck %s
2 ; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 \
3 ; RUN: -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check-prefix=DBG
4 ; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=1 < %s | \
5 ; RUN: FileCheck %s --check-prefix=DEV
6
7 ; Test that only white-listed intrinsics are allowed.
8
9 ; ===================================
10 ; Some disallowed "Dev" intrinsics.
11 ; CHECK: Function llvm.dbg.value is a disallowed LLVM intrinsic
12 ; DBG-NOT: Function llvm.dbg.value is a disallowed LLVM intrinsic
13 ; DEV-NOT: Function llvm.dbg.value is a disallowed LLVM intrinsic
14 declare void @llvm.dbg.value(metadata, i64, metadata)
15
16 ; CHECK: Function llvm.frameaddress is a disallowed LLVM intrinsic
17 ; DEV-NOT: Function llvm.frameaddress is a disallowed LLVM intrinsic
18 declare i8* @llvm.frameaddress(i32 %level)
19
20 ; CHECK: Function llvm.returnaddress is a disallowed LLVM intrinsic
21 ; DEV-NOT: Function llvm.returnaddress is a disallowed LLVM intrinsic
22 declare i8* @llvm.returnaddress(i32 %level)
23
24 ; ===================================
25 ; Always allowed intrinsics.
26 ; CHECK-NOT: Function llvm.lifetime.start is a disallowed LLVM intrinsic
27 ; DBG-NOT: Function llvm.lifetime.start is a disallowed LLVM intrinsic
28 ; DEV-NOT: Function llvm.lifetime.start is a disallowed LLVM intrinsic
29 declare void @llvm.lifetime.start(i64, i8* nocapture)
30
31 ; CHECK-NOT: Function llvm.lifetime.start is a disallowed LLVM intrinsic
32 declare void @llvm.lifetime.end(i64, i8* nocapture)
33 ; CHECK-NOT: Function llvm.memcpy.p0i8.p0i8.i32 is a disallowed LLVM intrinsic
34 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src,
35 i32 %len, i32 %align, i1 %isvolatile)
36 ; CHECK-NOT: Function llvm.memcpy.p0i8.p0i8.i64 is a disallowed LLVM intrinsic
37 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* %dest, i8* %src,
38 i64 %len, i32 %align, i1 %isvolatile)
39 ; CHECK-NOT: Function llvm.nacl.read.tp is a disallowed LLVM intrinsic
40 declare i8* @llvm.nacl.read.tp()
41
42 ; ===================================
43 ; Always disallowed intrinsics.
44 ; CHECK: Function llvm.adjust.trampoline is a disallowed LLVM intrinsic
45 ; DBG: Function llvm.adjust.trampoline is a disallowed LLVM intrinsic
46 ; DEV: Function llvm.adjust.trampoline is a disallowed LLVM intrinsic
47 declare i8* @llvm.adjust.trampoline(i8*)
48
49 ; CHECK: Function llvm.init.trampoline is a disallowed LLVM intrinsic
50 ; DBG: Function llvm.init.trampoline is a disallowed LLVM intrinsic
51 ; DEV: Function llvm.init.trampoline is a disallowed LLVM intrinsic
52 declare void @llvm.init.trampoline(i8*, i8*, i8*)
53
54 ; CHECK: Function llvm.x86.aesni.aeskeygenassist is a disallowed LLVM intrinsic
55 ; DBG: Function llvm.x86.aesni.aeskeygenassist is a disallowed LLVM intrinsic
56 ; DEV: Function llvm.x86.aesni.aeskeygenassist is a disallowed LLVM intrinsic
57 declare <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64>, i8)
58
59 ; CHECK: Function llvm.va_copy is a disallowed LLVM intrinsic
60 ; DBG: Function llvm.va_copy is a disallowed LLVM intrinsic
61 ; DEV: Function llvm.va_copy is a disallowed LLVM intrinsic
62 declare void @llvm.va_copy(i8*, i8*)
OLDNEW
« no previous file with comments | « lib/Analysis/NaCl/PNaClABIVerifyModule.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698