- AsmJit executables should have consistent prefix 'asmjit'.

- Added 'char' to type-id for function argument to typeId conversion.
- Added asmjit_test_x86 to be called by continuous integration.
This commit is contained in:
kobalicek
2015-02-09 00:03:27 +01:00
parent ba1c7ef145
commit de444b874a
6 changed files with 36 additions and 38 deletions

View File

@@ -33,6 +33,9 @@ script:
- ./build_dbg/asmjit_test
- ./build_rel/asmjit_test
- ./build_dbg/asmjit_test_x86
- ./build_rel/asmjit_test_x86
after_success:
- valgrind --leak-check=full --show-reachable=yes ./build_dbg/asmjit_test
- valgrind --leak-check=full --show-reachable=yes ./build_rel/asmjit_test

View File

@@ -353,9 +353,9 @@ EndIf()
If(ASMJIT_BUILD_SAMPLES)
Set(ASMJIT_SRC_SAMPLES
benchx86
testopcode
testx86
asmjit_bench_x86
asmjit_test_opcode
asmjit_test_x86
)
ForEach(file ${ASMJIT_SRC_SAMPLES})

View File

@@ -2518,7 +2518,7 @@ struct X86TestSuite {
PodVector<X86Test*> tests;
StringBuilder output;
int result;
int returnCode;
int binSize;
bool alwaysPrintLog;
};
@@ -2527,7 +2527,7 @@ struct X86TestSuite {
_Class_::add(tests)
X86TestSuite::X86TestSuite() :
result(EXIT_SUCCESS),
returnCode(0),
binSize(0),
alwaysPrintLog(false) {
@@ -2646,6 +2646,7 @@ int X86TestSuite::run() {
}
runtime.release(func);
returnCode = 1;
}
else {
if (!alwaysPrintLog) {
@@ -2655,6 +2656,8 @@ int X86TestSuite::run() {
fprintf(file, "-------------------------------------------------------------------------------\n");
fprintf(file, "[Failure] %s.\n", test->getName());
fprintf(file, "===============================================================================\n");
returnCode = 1;
}
fflush(file);
@@ -2664,7 +2667,7 @@ int X86TestSuite::run() {
fputs(output.getData(), file);
fflush(file);
return result;
return returnCode;
}
// ============================================================================

View File

@@ -1174,7 +1174,7 @@ struct DoubleType {};
#if !defined(ASMJIT_DOCGEN)
template<typename T>
struct TypeId {
enum { kId = static_cast<int>(::asmjit::kInvalidVar) };
// Left empty to report any type, which is not known to asmjit.
};
template<typename T>
@@ -1186,38 +1186,30 @@ struct TypeId<T*> {
template<> \
struct TypeId<_T_> { enum { kId = _Id_ }; }
ASMJIT_TYPE_ID(void, kInvalidVar);
ASMJIT_TYPE_ID(Void, kInvalidVar);
ASMJIT_TYPE_ID(void , kInvalidVar);
ASMJIT_TYPE_ID(char , IntTraits<char>::kIsSigned ? kVarTypeInt8 : kVarTypeUInt8);
ASMJIT_TYPE_ID(signed char , kVarTypeInt8);
ASMJIT_TYPE_ID(unsigned char, kVarTypeUInt8);
ASMJIT_TYPE_ID(int16_t , kVarTypeInt16);
ASMJIT_TYPE_ID(uint16_t , kVarTypeUInt16);
ASMJIT_TYPE_ID(int32_t , kVarTypeInt32);
ASMJIT_TYPE_ID(uint32_t , kVarTypeUInt32);
ASMJIT_TYPE_ID(int64_t , kVarTypeInt64);
ASMJIT_TYPE_ID(uint64_t , kVarTypeUInt64);
ASMJIT_TYPE_ID(float , kVarTypeFp32);
ASMJIT_TYPE_ID(double , kVarTypeFp64);
ASMJIT_TYPE_ID(int8_t, kVarTypeInt8);
ASMJIT_TYPE_ID(Int8Type, kVarTypeInt8);
ASMJIT_TYPE_ID(uint8_t, kVarTypeUInt8);
ASMJIT_TYPE_ID(UInt8Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(int16_t, kVarTypeInt16);
ASMJIT_TYPE_ID(Int16Type, kVarTypeInt16);
ASMJIT_TYPE_ID(uint16_t, kVarTypeUInt8);
ASMJIT_TYPE_ID(UInt16Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(int32_t, kVarTypeInt32);
ASMJIT_TYPE_ID(Int32Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(uint32_t, kVarTypeUInt32);
ASMJIT_TYPE_ID(UInt32Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(int64_t, kVarTypeInt64);
ASMJIT_TYPE_ID(Int64Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(uint64_t, kVarTypeUInt64);
ASMJIT_TYPE_ID(UInt64Type, kVarTypeUInt8);
ASMJIT_TYPE_ID(float, kVarTypeFp32);
ASMJIT_TYPE_ID(FloatType, kVarTypeFp32);
ASMJIT_TYPE_ID(double, kVarTypeFp64);
ASMJIT_TYPE_ID(DoubleType, kVarTypeFp64);
ASMJIT_TYPE_ID(Void , kInvalidVar);
ASMJIT_TYPE_ID(Int8Type , kVarTypeInt8);
ASMJIT_TYPE_ID(UInt8Type , kVarTypeUInt8);
ASMJIT_TYPE_ID(Int16Type , kVarTypeInt16);
ASMJIT_TYPE_ID(UInt16Type , kVarTypeUInt16);
ASMJIT_TYPE_ID(Int32Type , kVarTypeUInt32);
ASMJIT_TYPE_ID(UInt32Type , kVarTypeUInt32);
ASMJIT_TYPE_ID(Int64Type , kVarTypeUInt64);
ASMJIT_TYPE_ID(UInt64Type , kVarTypeUInt64);
ASMJIT_TYPE_ID(FloatType , kVarTypeFp32);
ASMJIT_TYPE_ID(DoubleType , kVarTypeFp64);
#endif // !ASMJIT_DOCGEN
// ============================================================================