first commit
This commit is contained in:
@@ -1150,6 +1150,8 @@ DefineStdlib(SymbolTable *symbolTable, llvm::LLVMContext *ctx, llvm::Module *mod
|
|||||||
symbolTable);
|
symbolTable);
|
||||||
lDefineConstantInt("__have_native_transcendentals", g->target->hasTranscendentals(),
|
lDefineConstantInt("__have_native_transcendentals", g->target->hasTranscendentals(),
|
||||||
module, symbolTable);
|
module, symbolTable);
|
||||||
|
lDefineConstantInt("__have_native_trigonometry", g->target->hasTrigonometry(),
|
||||||
|
module, symbolTable);
|
||||||
lDefineConstantInt("__have_native_rsqrtd", g->target->hasRsqrtd(),
|
lDefineConstantInt("__have_native_rsqrtd", g->target->hasRsqrtd(),
|
||||||
module, symbolTable);
|
module, symbolTable);
|
||||||
lDefineConstantInt("__have_native_rcpd", g->target->hasRcpd(),
|
lDefineConstantInt("__have_native_rcpd", g->target->hasRcpd(),
|
||||||
|
|||||||
6
ispc.cpp
6
ispc.cpp
@@ -202,6 +202,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
m_hasGather(false),
|
m_hasGather(false),
|
||||||
m_hasScatter(false),
|
m_hasScatter(false),
|
||||||
m_hasTranscendentals(false),
|
m_hasTranscendentals(false),
|
||||||
|
m_hasTrigonometry(false),
|
||||||
m_hasRsqrtd(false),
|
m_hasRsqrtd(false),
|
||||||
m_hasRcpd(false)
|
m_hasRcpd(false)
|
||||||
{
|
{
|
||||||
@@ -420,6 +421,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_maskBitCount = 1;
|
this->m_maskBitCount = 1;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
this->m_hasTranscendentals = true;
|
this->m_hasTranscendentals = true;
|
||||||
|
this->m_hasTrigonometry = true;
|
||||||
this->m_hasGather = this->m_hasScatter = true;
|
this->m_hasGather = this->m_hasScatter = true;
|
||||||
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
||||||
}
|
}
|
||||||
@@ -433,6 +435,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_maskBitCount = 1;
|
this->m_maskBitCount = 1;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
this->m_hasTranscendentals = true;
|
this->m_hasTranscendentals = true;
|
||||||
|
this->m_hasTrigonometry = true;
|
||||||
this->m_hasGather = this->m_hasScatter = true;
|
this->m_hasGather = this->m_hasScatter = true;
|
||||||
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
||||||
}
|
}
|
||||||
@@ -446,6 +449,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_maskBitCount = 1;
|
this->m_maskBitCount = 1;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
this->m_hasTranscendentals = true;
|
this->m_hasTranscendentals = true;
|
||||||
|
this->m_hasTrigonometry = true;
|
||||||
this->m_hasGather = this->m_hasScatter = true;
|
this->m_hasGather = this->m_hasScatter = true;
|
||||||
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
||||||
}
|
}
|
||||||
@@ -459,6 +463,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_maskBitCount = 1;
|
this->m_maskBitCount = 1;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
this->m_hasTranscendentals = true;
|
this->m_hasTranscendentals = true;
|
||||||
|
this->m_hasTrigonometry = true;
|
||||||
this->m_hasGather = this->m_hasScatter = true;
|
this->m_hasGather = this->m_hasScatter = true;
|
||||||
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
||||||
}
|
}
|
||||||
@@ -472,6 +477,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_maskBitCount = 1;
|
this->m_maskBitCount = 1;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
this->m_hasTranscendentals = true;
|
this->m_hasTranscendentals = true;
|
||||||
|
this->m_hasTrigonometry = true;
|
||||||
this->m_hasGather = this->m_hasScatter = true;
|
this->m_hasGather = this->m_hasScatter = true;
|
||||||
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
this->m_hasRsqrtd = this->m_hasRcpd = true;
|
||||||
}
|
}
|
||||||
|
|||||||
5
ispc.h
5
ispc.h
@@ -282,6 +282,8 @@ public:
|
|||||||
|
|
||||||
bool hasTranscendentals() const {return m_hasTranscendentals;}
|
bool hasTranscendentals() const {return m_hasTranscendentals;}
|
||||||
|
|
||||||
|
bool hasTrigonometry() const {return m_hasTrigonometry;}
|
||||||
|
|
||||||
bool hasRsqrtd() const {return m_hasRsqrtd;}
|
bool hasRsqrtd() const {return m_hasRsqrtd;}
|
||||||
|
|
||||||
bool hasRcpd() const {return m_hasRcpd;}
|
bool hasRcpd() const {return m_hasRcpd;}
|
||||||
@@ -385,6 +387,9 @@ private:
|
|||||||
sqrt, which we assume that all of them handle). */
|
sqrt, which we assume that all of them handle). */
|
||||||
bool m_hasTranscendentals;
|
bool m_hasTranscendentals;
|
||||||
|
|
||||||
|
/** Indicates whether the target has ISA support for trigonometry */
|
||||||
|
bool m_hasTrigonometry;
|
||||||
|
|
||||||
/** Indicates whether there is an ISA double precision rsqrt. */
|
/** Indicates whether there is an ISA double precision rsqrt. */
|
||||||
bool m_hasRsqrtd;
|
bool m_hasRsqrtd;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user