SPU LLVM: emulate PSHUFB

For targets without SSSE3 support
This commit is contained in:
Nekotekina
2018-05-28 22:28:39 +03:00
parent 759370ea1b
commit 37577714fa
3 changed files with 45 additions and 1 deletions
+19
View File
@@ -500,6 +500,25 @@ jit_compiler::~jit_compiler()
{
}
bool jit_compiler::has_ssse3() const
{
if (m_cpu == "generic" ||
m_cpu == "k8" ||
m_cpu == "opteron" ||
m_cpu == "athlon64" ||
m_cpu == "athlon-fx" ||
m_cpu == "k8-sse3" ||
m_cpu == "opteron-sse3" ||
m_cpu == "athlon64-sse3" ||
m_cpu == "amdfam10" ||
m_cpu == "barcelona")
{
return false;
}
return true;
}
void jit_compiler::add(std::unique_ptr<llvm::Module> module, const std::string& path)
{
ObjectCache cache{path};
+3
View File
@@ -111,6 +111,9 @@ public:
return *m_engine;
}
// Test SSSE3 feature
bool has_ssse3() const;
// Add module (path to obj cache dir)
void add(std::unique_ptr<llvm::Module> module, const std::string& path);