OLD | NEW |
1 //===- PNaClABIVerifyModule.cpp - Verify PNaCl ABI rules ------------------===// | 1 //===- PNaClABIVerifyModule.cpp - Verify PNaCl ABI rules ------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // Verify module-level PNaCl ABI requirements (specifically those that do not | 10 // Verify module-level PNaCl ABI requirements (specifically those that do not |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 addIntrinsic(Intrinsic::sqrt, Double); | 207 addIntrinsic(Intrinsic::sqrt, Double); |
208 | 208 |
209 Type *AtomicTypes[] = { I8, I16, I32, I64 }; | 209 Type *AtomicTypes[] = { I8, I16, I32, I64 }; |
210 for (size_t T = 0, E = array_lengthof(AtomicTypes); T != E; ++T) { | 210 for (size_t T = 0, E = array_lengthof(AtomicTypes); T != E; ++T) { |
211 addIntrinsic(Intrinsic::nacl_atomic_load, AtomicTypes[T]); | 211 addIntrinsic(Intrinsic::nacl_atomic_load, AtomicTypes[T]); |
212 addIntrinsic(Intrinsic::nacl_atomic_store, AtomicTypes[T]); | 212 addIntrinsic(Intrinsic::nacl_atomic_store, AtomicTypes[T]); |
213 addIntrinsic(Intrinsic::nacl_atomic_rmw, AtomicTypes[T]); | 213 addIntrinsic(Intrinsic::nacl_atomic_rmw, AtomicTypes[T]); |
214 addIntrinsic(Intrinsic::nacl_atomic_cmpxchg, AtomicTypes[T]); | 214 addIntrinsic(Intrinsic::nacl_atomic_cmpxchg, AtomicTypes[T]); |
215 } | 215 } |
216 addIntrinsic(Intrinsic::nacl_atomic_fence); | 216 addIntrinsic(Intrinsic::nacl_atomic_fence); |
| 217 addIntrinsic(Intrinsic::nacl_atomic_fence_all); |
217 | 218 |
218 addIntrinsic(Intrinsic::nacl_atomic_is_lock_free); | 219 addIntrinsic(Intrinsic::nacl_atomic_is_lock_free); |
219 | 220 |
220 // Stack save and restore are used to support C99 VLAs. | 221 // Stack save and restore are used to support C99 VLAs. |
221 addIntrinsic(Intrinsic::stacksave); | 222 addIntrinsic(Intrinsic::stacksave); |
222 addIntrinsic(Intrinsic::stackrestore); | 223 addIntrinsic(Intrinsic::stackrestore); |
223 | 224 |
224 addIntrinsic(Intrinsic::trap); | 225 addIntrinsic(Intrinsic::trap); |
225 | 226 |
226 // We only allow the variants of memcpy/memmove/memset with an i32 | 227 // We only allow the variants of memcpy/memmove/memset with an i32 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 525 } |
525 | 526 |
526 char PNaClABIVerifyModule::ID = 0; | 527 char PNaClABIVerifyModule::ID = 0; |
527 INITIALIZE_PASS(PNaClABIVerifyModule, "verify-pnaclabi-module", | 528 INITIALIZE_PASS(PNaClABIVerifyModule, "verify-pnaclabi-module", |
528 "Verify module for PNaCl", false, true) | 529 "Verify module for PNaCl", false, true) |
529 | 530 |
530 ModulePass *llvm::createPNaClABIVerifyModulePass( | 531 ModulePass *llvm::createPNaClABIVerifyModulePass( |
531 PNaClABIErrorReporter *Reporter, bool StreamingMode) { | 532 PNaClABIErrorReporter *Reporter, bool StreamingMode) { |
532 return new PNaClABIVerifyModule(Reporter, StreamingMode); | 533 return new PNaClABIVerifyModule(Reporter, StreamingMode); |
533 } | 534 } |
OLD | NEW |