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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 case Intrinsic::memcpy: | 141 case Intrinsic::memcpy: |
142 case Intrinsic::memmove: | 142 case Intrinsic::memmove: |
143 case Intrinsic::memset: | 143 case Intrinsic::memset: |
144 case Intrinsic::nacl_read_tp: | 144 case Intrinsic::nacl_read_tp: |
145 case Intrinsic::trap: | 145 case Intrinsic::trap: |
146 return true; | 146 return true; |
147 | 147 |
148 // (2) Known to be never allowed. | 148 // (2) Known to be never allowed. |
149 case Intrinsic::not_intrinsic: | 149 case Intrinsic::not_intrinsic: |
150 case Intrinsic::adjust_trampoline: | 150 case Intrinsic::adjust_trampoline: |
| 151 case Intrinsic::eh_dwarf_cfa: |
| 152 case Intrinsic::eh_return_i32: |
| 153 case Intrinsic::eh_return_i64: |
| 154 case Intrinsic::eh_sjlj_callsite: |
| 155 case Intrinsic::eh_sjlj_functioncontext: |
| 156 case Intrinsic::eh_sjlj_longjmp: |
| 157 case Intrinsic::eh_sjlj_lsda: |
| 158 case Intrinsic::eh_sjlj_setjmp: |
| 159 case Intrinsic::eh_typeid_for: |
| 160 case Intrinsic::eh_unwind_init: |
151 case Intrinsic::init_trampoline: | 161 case Intrinsic::init_trampoline: |
152 case Intrinsic::stackprotector: | 162 case Intrinsic::stackprotector: |
153 case Intrinsic::vacopy: | 163 case Intrinsic::vacopy: |
154 case Intrinsic::vaend: | 164 case Intrinsic::vaend: |
155 case Intrinsic::vastart: | 165 case Intrinsic::vastart: |
156 return false; | 166 return false; |
157 | 167 |
158 // (3) Dev intrinsics. | 168 // (3) Dev intrinsics. |
159 case Intrinsic::dbg_declare: | 169 case Intrinsic::dbg_declare: |
160 case Intrinsic::dbg_value: | 170 case Intrinsic::dbg_value: |
161 return PNaClABIAllowDevIntrinsics || PNaClABIAllowDebugMetadata; | 171 return PNaClABIAllowDevIntrinsics || PNaClABIAllowDebugMetadata; |
162 case Intrinsic::bswap: // Support via compiler_rt if arch doesn't have it? | 172 case Intrinsic::bswap: // Support via compiler_rt if arch doesn't have it? |
163 case Intrinsic::cos: // Rounding not defined: support with fast-math? | 173 case Intrinsic::cos: // Rounding not defined: support with fast-math? |
164 case Intrinsic::ctlz: // Support via compiler_rt if arch doesn't have it? | 174 case Intrinsic::ctlz: // Support via compiler_rt if arch doesn't have it? |
165 case Intrinsic::ctpop: // Support via compiler_rt if arch doesn't have it? | 175 case Intrinsic::ctpop: // Support via compiler_rt if arch doesn't have it? |
166 case Intrinsic::cttz: // Support via compiler_rt if arch doesn't have it? | 176 case Intrinsic::cttz: // Support via compiler_rt if arch doesn't have it? |
167 case Intrinsic::eh_dwarf_cfa: // For EH tests. | |
168 case Intrinsic::exp: // Rounding not defined: support with fast-math? | 177 case Intrinsic::exp: // Rounding not defined: support with fast-math? |
169 case Intrinsic::exp2: // Rounding not defined: support with fast-math? | 178 case Intrinsic::exp2: // Rounding not defined: support with fast-math? |
170 case Intrinsic::expect: // From __builtin_expect. | 179 case Intrinsic::expect: // From __builtin_expect. |
171 case Intrinsic::flt_rounds: | 180 case Intrinsic::flt_rounds: |
172 case Intrinsic::frameaddress: // Support for 0-level or not? | 181 case Intrinsic::frameaddress: // Support for 0-level or not? |
173 case Intrinsic::log: // Rounding not defined: support with fast-math? | 182 case Intrinsic::log: // Rounding not defined: support with fast-math? |
174 case Intrinsic::log2: // Rounding not defined: support with fast-math? | 183 case Intrinsic::log2: // Rounding not defined: support with fast-math? |
175 case Intrinsic::log10: // Rounding not defined: support with fast-math? | 184 case Intrinsic::log10: // Rounding not defined: support with fast-math? |
176 case Intrinsic::nacl_target_arch: // Used by translator self-build. | 185 case Intrinsic::nacl_target_arch: // Used by translator self-build. |
177 case Intrinsic::pow: // Rounding is supposed to be the same as libm. | 186 case Intrinsic::pow: // Rounding is supposed to be the same as libm. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 311 } |
303 | 312 |
304 char PNaClABIVerifyModule::ID = 0; | 313 char PNaClABIVerifyModule::ID = 0; |
305 INITIALIZE_PASS(PNaClABIVerifyModule, "verify-pnaclabi-module", | 314 INITIALIZE_PASS(PNaClABIVerifyModule, "verify-pnaclabi-module", |
306 "Verify module for PNaCl", false, true) | 315 "Verify module for PNaCl", false, true) |
307 | 316 |
308 ModulePass *llvm::createPNaClABIVerifyModulePass( | 317 ModulePass *llvm::createPNaClABIVerifyModulePass( |
309 PNaClABIErrorReporter *Reporter) { | 318 PNaClABIErrorReporter *Reporter) { |
310 return new PNaClABIVerifyModule(Reporter); | 319 return new PNaClABIVerifyModule(Reporter); |
311 } | 320 } |
OLD | NEW |