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

Side by Side Diff: test/NaCl/PNaClABI/abi-stripped-pointers.ll

Issue 17777004: Concurrency support for PNaCl ABI (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Fix bad merge. Created 7 years, 5 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 | « test/NaCl/PNaClABI/abi-alignment.ll ('k') | test/NaCl/PNaClABI/instructions.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: pnacl-abicheck < %s | FileCheck %s 1 ; RUN: pnacl-abicheck < %s | FileCheck %s
2 2
3 ; This test checks that the PNaCl ABI verifier enforces the normal 3 ; This test checks that the PNaCl ABI verifier enforces the normal
4 ; form introduced by the ReplacePtrsWithInts pass. 4 ; form introduced by the ReplacePtrsWithInts pass.
5 5
6 6
7 @var = global [4 x i8] c"xxxx" 7 @var = global [4 x i8] c"xxxx"
8 @ptr = global i32 ptrtoint ([4 x i8]* @var to i32) 8 @ptr = global i32 ptrtoint ([4 x i8]* @var to i32)
9 9
10 declare i8* @llvm.nacl.read.tp() 10 declare i8* @llvm.nacl.read.tp()
(...skipping 23 matching lines...) Expand all
34 34
35 ptrtoint [4 x i8]* @var to i32 35 ptrtoint [4 x i8]* @var to i32
36 36
37 %alloc = alloca i8 37 %alloc = alloca i8
38 ptrtoint i8* %alloc to i32 38 ptrtoint i8* %alloc to i32
39 load i8* %alloc, align 1 39 load i8* %alloc, align 1
40 40
41 ; These instructions may use a NormalizedPtr, which may be a global. 41 ; These instructions may use a NormalizedPtr, which may be a global.
42 load i32* @ptr, align 1 42 load i32* @ptr, align 1
43 store i32 123, i32* @ptr, align 1 43 store i32 123, i32* @ptr, align 1
44 cmpxchg i32* @ptr, i32 1, i32 2 seq_cst
45 atomicrmw add i32* @ptr, i32 3 seq_cst
46 44
47 ; A NormalizedPtr may be a bitcast. 45 ; A NormalizedPtr may be a bitcast.
48 %ptr_bitcast = bitcast [4 x i8]* @var to i32* 46 %ptr_bitcast = bitcast [4 x i8]* @var to i32*
49 load i32* %ptr_bitcast, align 1 47 load i32* %ptr_bitcast, align 1
50 48
51 ; A NormalizedPtr may be an inttoptr. 49 ; A NormalizedPtr may be an inttoptr.
52 %ptr_from_int = inttoptr i32 123 to i32* 50 %ptr_from_int = inttoptr i32 123 to i32*
53 load i32* %ptr_from_int, align 1 51 load i32* %ptr_from_int, align 1
54 52
55 ; Check direct and indirect function calls. 53 ; Check direct and indirect function calls.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ; CHECK-NEXT: bad operand 123 ; CHECK-NEXT: bad operand
126 124
127 ; Taking the address of an intrinsic is not allowed. 125 ; Taking the address of an intrinsic is not allowed.
128 ptrtoint i8* ()* @llvm.nacl.read.tp to i32 126 ptrtoint i8* ()* @llvm.nacl.read.tp to i32
129 ; CHECK-NEXT: operand not InherentPtr 127 ; CHECK-NEXT: operand not InherentPtr
130 128
131 ret void 129 ret void
132 } 130 }
133 131
134 ; CHECK-NOT: disallowed 132 ; CHECK-NOT: disallowed
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/abi-alignment.ll ('k') | test/NaCl/PNaClABI/instructions.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698