OLD | NEW |
1 //===---- TargetInfo.cpp - Encapsulate target details -----------*- C++ -*-===// | 1 //===---- TargetInfo.cpp - Encapsulate target details -----------*- C++ -*-===// |
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 // These classes wrap the information about a call or function | 10 // These classes wrap the information about a call or function |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 }; | 430 }; |
431 | 431 |
432 class PNaClTargetCodeGenInfo : public TargetCodeGenInfo { | 432 class PNaClTargetCodeGenInfo : public TargetCodeGenInfo { |
433 public: | 433 public: |
434 PNaClTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) | 434 PNaClTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) |
435 : TargetCodeGenInfo(new PNaClABIInfo(CGT)) {} | 435 : TargetCodeGenInfo(new PNaClABIInfo(CGT)) {} |
436 | 436 |
437 /// For PNaCl we don't want llvm.pow.* intrinsics to be emitted instead | 437 /// For PNaCl we don't want llvm.pow.* intrinsics to be emitted instead |
438 /// of library function calls. | 438 /// of library function calls. |
439 bool emitIntrinsicForPow() const { return false; } | 439 bool emitIntrinsicForPow() const { return false; } |
| 440 bool addAsmMemoryAroundSyncSynchronize() const { return true; } // @LOCALMOD |
| 441 bool asmMemoryIsFence() const { return true; } // @LOCALMOD |
440 }; | 442 }; |
441 | 443 |
442 void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const { | 444 void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const { |
443 FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); | 445 FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); |
444 | 446 |
445 for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); | 447 for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); |
446 it != ie; ++it) | 448 it != ie; ++it) |
447 it->info = classifyArgumentType(it->type); | 449 it->info = classifyArgumentType(it->type); |
448 } | 450 } |
449 | 451 |
(...skipping 4750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5200 HasAVX)); | 5202 HasAVX)); |
5201 default: | 5203 default: |
5202 return *(TheTargetCodeGenInfo = new X86_64TargetCodeGenInfo(Types, | 5204 return *(TheTargetCodeGenInfo = new X86_64TargetCodeGenInfo(Types, |
5203 HasAVX)); | 5205 HasAVX)); |
5204 } | 5206 } |
5205 } | 5207 } |
5206 case llvm::Triple::hexagon: | 5208 case llvm::Triple::hexagon: |
5207 return *(TheTargetCodeGenInfo = new HexagonTargetCodeGenInfo(Types)); | 5209 return *(TheTargetCodeGenInfo = new HexagonTargetCodeGenInfo(Types)); |
5208 } | 5210 } |
5209 } | 5211 } |
OLD | NEW |