Explicitly set armv7-eabi target triple on ARM.
This lets the compiler generate FMA instructions, which seems desirable.
This commit is contained in:
6
ispc.cpp
6
ispc.cpp
@@ -576,6 +576,10 @@ Target::SupportedTargetISAs() {
|
|||||||
std::string
|
std::string
|
||||||
Target::GetTripleString() const {
|
Target::GetTripleString() const {
|
||||||
llvm::Triple triple;
|
llvm::Triple triple;
|
||||||
|
if (m_arch == "arm") {
|
||||||
|
triple.setTriple("armv7-eabi");
|
||||||
|
}
|
||||||
|
else {
|
||||||
// Start with the host triple as the default
|
// Start with the host triple as the default
|
||||||
triple.setTriple(llvm::sys::getDefaultTargetTriple());
|
triple.setTriple(llvm::sys::getDefaultTargetTriple());
|
||||||
|
|
||||||
@@ -591,7 +595,7 @@ Target::GetTripleString() const {
|
|||||||
triple.setArchName("x86_64");
|
triple.setArchName("x86_64");
|
||||||
else
|
else
|
||||||
triple.setArchName(m_arch);
|
triple.setArchName(m_arch);
|
||||||
|
}
|
||||||
return triple.str();
|
return triple.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user