| 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 this->LongDoubleWidth = 64; | 633 this->LongDoubleWidth = 64; |
| 634 this->LongDoubleAlign = 64; | 634 this->LongDoubleAlign = 64; |
| 635 this->LongLongWidth = 64; | 635 this->LongLongWidth = 64; |
| 636 this->LongLongAlign = 64; | 636 this->LongLongAlign = 64; |
| 637 this->SizeType = TargetInfo::UnsignedInt; | 637 this->SizeType = TargetInfo::UnsignedInt; |
| 638 this->PtrDiffType = TargetInfo::SignedInt; | 638 this->PtrDiffType = TargetInfo::SignedInt; |
| 639 this->IntPtrType = TargetInfo::SignedInt; | 639 this->IntPtrType = TargetInfo::SignedInt; |
| 640 // RegParmMax is inherited from the underlying architecture | 640 // RegParmMax is inherited from the underlying architecture |
| 641 this->LongDoubleFormat = &llvm::APFloat::IEEEdouble; | 641 this->LongDoubleFormat = &llvm::APFloat::IEEEdouble; |
| 642 if (Triple.getArch() == llvm::Triple::arm) { | 642 if (Triple.getArch() == llvm::Triple::arm) { |
| 643 this->DescriptionString = | 643 // @LOCALMOD |
| 644 "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S128"; | 644 // Handled in ARM's setABI(). |
| 645 } else if (Triple.getArch() == llvm::Triple::x86) { | 645 } else if (Triple.getArch() == llvm::Triple::x86) { |
| 646 this->DescriptionString = "e-m:e-p:32:32-i64:64-n8:16:32-S128"; | 646 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-S128"; |
| 647 } else if (Triple.getArch() == llvm::Triple::x86_64) { | 647 } else if (Triple.getArch() == llvm::Triple::x86_64) { |
| 648 this->DescriptionString = "e-m:e-p:32:32-i64:64-n8:16:32:64-S128"; | 648 this->DescriptionString = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"; |
| 649 } else if (Triple.getArch() == llvm::Triple::mipsel) { | 649 } else if (Triple.getArch() == llvm::Triple::mipsel) { |
| 650 // Handled on mips' setDescriptionString. | 650 // Handled on mips' setDescriptionString. |
| 651 } else { | 651 } else { |
| 652 assert(Triple.getArch() == llvm::Triple::le32); | 652 assert(Triple.getArch() == llvm::Triple::le32); |
| 653 this->DescriptionString = "e-p:32:32-i64:64"; | 653 this->DescriptionString = "e-p:32:32-i64:64-n32"; |
| 654 } | 654 } |
| 655 } | 655 } |
| 656 typename Target::CallingConvCheckResult checkCallingConvention( | 656 typename Target::CallingConvCheckResult checkCallingConvention( |
| 657 CallingConv CC) const override { | 657 CallingConv CC) const override { |
| 658 return CC == CC_PnaclCall ? Target::CCCR_OK : | 658 return CC == CC_PnaclCall ? Target::CCCR_OK : |
| 659 Target::checkCallingConvention(CC); | 659 Target::checkCallingConvention(CC); |
| 660 } | 660 } |
| 661 }; | 661 }; |
| 662 } // end anonymous namespace. | 662 } // end anonymous namespace. |
| 663 | 663 |
| (...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3728 // FIXME: this is invalid for WindowsCE | 3728 // FIXME: this is invalid for WindowsCE |
| 3729 assert(!BigEndian && "Windows on ARM does not support big endian"); | 3729 assert(!BigEndian && "Windows on ARM does not support big endian"); |
| 3730 DescriptionString = "e" | 3730 DescriptionString = "e" |
| 3731 "-m:e" | 3731 "-m:e" |
| 3732 "-p:32:32" | 3732 "-p:32:32" |
| 3733 "-i64:64" | 3733 "-i64:64" |
| 3734 "-v128:64:128" | 3734 "-v128:64:128" |
| 3735 "-a:0:32" | 3735 "-a:0:32" |
| 3736 "-n32" | 3736 "-n32" |
| 3737 "-S64"; | 3737 "-S64"; |
| 3738 // @LOCALMOD-BEGIN |
| 3739 } else if (T.isOSNaCl()) { |
| 3740 assert(!BigEndian && "NaCl on ARM does not support big endian"); |
| 3741 DescriptionString = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S128"; |
| 3738 } else { | 3742 } else { |
| 3743 // @LOCALMOD-END |
| 3739 DescriptionString = | 3744 DescriptionString = |
| 3740 BigEndian ? "E-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" | 3745 BigEndian ? "E-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" |
| 3741 : "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"; | 3746 : "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"; |
| 3742 } | 3747 } |
| 3743 | 3748 |
| 3744 // FIXME: Enumerated types are variable width in straight AAPCS. | 3749 // FIXME: Enumerated types are variable width in straight AAPCS. |
| 3745 } | 3750 } |
| 3746 | 3751 |
| 3747 void setABIAPCS() { | 3752 void setABIAPCS() { |
| 3748 const llvm::Triple &T = getTriple(); | 3753 const llvm::Triple &T = getTriple(); |
| (...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6678 // need to pass the minuses. | 6683 // need to pass the minuses. |
| 6679 Opts->Features.clear(); | 6684 Opts->Features.clear(); |
| 6680 for (llvm::StringMap<bool>::const_iterator it = Features.begin(), | 6685 for (llvm::StringMap<bool>::const_iterator it = Features.begin(), |
| 6681 ie = Features.end(); it != ie; ++it) | 6686 ie = Features.end(); it != ie; ++it) |
| 6682 Opts->Features.push_back((it->second ? "+" : "-") + it->first().str()); | 6687 Opts->Features.push_back((it->second ? "+" : "-") + it->first().str()); |
| 6683 if (!Target->handleTargetFeatures(Opts->Features, Diags)) | 6688 if (!Target->handleTargetFeatures(Opts->Features, Diags)) |
| 6684 return nullptr; | 6689 return nullptr; |
| 6685 | 6690 |
| 6686 return Target.release(); | 6691 return Target.release(); |
| 6687 } | 6692 } |
| OLD | NEW |