OLD | NEW |
---|---|
1 //===--- Targets.cpp - Implement -arch option and targets -----------------===// | 1 //===--- Targets.cpp - Implement -arch option and targets -----------------===// |
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 // This file implements construction of a TargetInfo object from a | 10 // This file implements construction of a TargetInfo object from a |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 this->LongDoubleWidth = 64; | 651 this->LongDoubleWidth = 64; |
652 this->LongDoubleAlign = 64; | 652 this->LongDoubleAlign = 64; |
653 this->LongLongWidth = 64; | 653 this->LongLongWidth = 64; |
654 this->LongLongAlign = 64; | 654 this->LongLongAlign = 64; |
655 this->SizeType = TargetInfo::UnsignedInt; | 655 this->SizeType = TargetInfo::UnsignedInt; |
656 this->PtrDiffType = TargetInfo::SignedInt; | 656 this->PtrDiffType = TargetInfo::SignedInt; |
657 this->IntPtrType = TargetInfo::SignedInt; | 657 this->IntPtrType = TargetInfo::SignedInt; |
658 // RegParmMax is inherited from the underlying architecture | 658 // RegParmMax is inherited from the underlying architecture |
659 this->LongDoubleFormat = &llvm::APFloat::IEEEdouble; | 659 this->LongDoubleFormat = &llvm::APFloat::IEEEdouble; |
660 if (Triple.getArch() == llvm::Triple::arm) { | 660 if (Triple.getArch() == llvm::Triple::arm) { |
661 this->DescriptionString = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S128"; | 661 // Handled in ARM's setABI(). |
Derek Schuff
2014/11/11 17:59:30
I guess if this is going to change upstream we sho
jvoung (off chromium)
2014/11/11 18:23:49
Done
| |
662 } else if (Triple.getArch() == llvm::Triple::x86) { | 662 } else if (Triple.getArch() == llvm::Triple::x86) { |
663 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-S128"; | 663 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-S128"; |
664 } else if (Triple.getArch() == llvm::Triple::x86_64) { | 664 } else if (Triple.getArch() == llvm::Triple::x86_64) { |
665 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"; | 665 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"; |
666 } else if (Triple.getArch() == llvm::Triple::mipsel) { | 666 } else if (Triple.getArch() == llvm::Triple::mipsel) { |
667 // Handled on mips' setDescriptionString. | 667 // Handled on mips' setDescriptionString. |
668 } else { | 668 } else { |
669 assert(Triple.getArch() == llvm::Triple::le32); | 669 assert(Triple.getArch() == llvm::Triple::le32); |
670 this->DescriptionString = "e-p:32:32-i64:64"; | 670 this->DescriptionString = "e-p:32:32-i64:64"; |
671 } | 671 } |
(...skipping 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3580 "E-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-" | 3580 "E-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-" |
3581 "v128:64:128-a:0:32-n32-S64" : | 3581 "v128:64:128-a:0:32-n32-S64" : |
3582 "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-" | 3582 "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-" |
3583 "v128:64:128-a:0:32-n32-S64"; | 3583 "v128:64:128-a:0:32-n32-S64"; |
3584 } | 3584 } |
3585 } else { | 3585 } else { |
3586 if (T.isOSBinFormatMachO()) | 3586 if (T.isOSBinFormatMachO()) |
3587 DescriptionString = BigEndian ? | 3587 DescriptionString = BigEndian ? |
3588 "E-m:o-p:32:32-i64:64-v128:64:128-n32-S64" : | 3588 "E-m:o-p:32:32-i64:64-v128:64:128-n32-S64" : |
3589 "e-m:o-p:32:32-i64:64-v128:64:128-n32-S64"; | 3589 "e-m:o-p:32:32-i64:64-v128:64:128-n32-S64"; |
3590 else | 3590 else if (T.isOSNaCl()) { |
3591 assert(!BigEndian && "NaCl on ARM does not support big endian"); | |
3592 DescriptionString = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S128"; | |
3593 } else | |
3591 DescriptionString = BigEndian ? | 3594 DescriptionString = BigEndian ? |
3592 "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64" : | 3595 "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64" : |
3593 "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"; | 3596 "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"; |
3594 } | 3597 } |
3595 | 3598 |
3596 // FIXME: Enumerated types are variable width in straight AAPCS. | 3599 // FIXME: Enumerated types are variable width in straight AAPCS. |
3597 } | 3600 } |
3598 | 3601 |
3599 void setABIAPCS() { | 3602 void setABIAPCS() { |
3600 const llvm::Triple &T = getTriple(); | 3603 const llvm::Triple &T = getTriple(); |
(...skipping 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6437 // need to pass the minuses. | 6440 // need to pass the minuses. |
6438 Opts->Features.clear(); | 6441 Opts->Features.clear(); |
6439 for (llvm::StringMap<bool>::const_iterator it = Features.begin(), | 6442 for (llvm::StringMap<bool>::const_iterator it = Features.begin(), |
6440 ie = Features.end(); it != ie; ++it) | 6443 ie = Features.end(); it != ie; ++it) |
6441 Opts->Features.push_back((it->second ? "+" : "-") + it->first().str()); | 6444 Opts->Features.push_back((it->second ? "+" : "-") + it->first().str()); |
6442 if (!Target->handleTargetFeatures(Opts->Features, Diags)) | 6445 if (!Target->handleTargetFeatures(Opts->Features, Diags)) |
6443 return nullptr; | 6446 return nullptr; |
6444 | 6447 |
6445 return Target.release(); | 6448 return Target.release(); |
6446 } | 6449 } |
OLD | NEW |