mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 01:38:03 +00:00
Begin setting features for target based on target triple string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46863 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27240c7d50
commit
5252ae6eca
@ -247,8 +247,19 @@ LTO::getTarget (Module *M) {
|
||||
return;
|
||||
|
||||
// Create target
|
||||
std::string Features;
|
||||
Target = March->CtorFn(*M, Features);
|
||||
SubtargetFeatures Features;
|
||||
std::string FeatureStr;
|
||||
std::string TargetTriple = M->getTargetTriple();
|
||||
|
||||
if (strncmp(TargetTriple.c_str(), "powerpc-apple-", 14) == 0)
|
||||
Features.AddFeature("altivec", true);
|
||||
else if (strncmp(TargetTriple.c_str(), "powerpc64-apple-", 16) == 0) {
|
||||
Features.AddFeature("64bit", true);
|
||||
Features.AddFeature("altivec", true);
|
||||
}
|
||||
|
||||
FeatureStr = Features.getString();
|
||||
Target = March->CtorFn(*M, FeatureStr);
|
||||
}
|
||||
|
||||
/// Optimize module M using various IPO passes. Use exportList to
|
||||
|
Loading…
x
Reference in New Issue
Block a user