Don't exclude gcc in travis-ci.

Asmjit_test should show info about current CPU.
This commit is contained in:
kobalicek 2015-02-09 01:11:50 +01:00
parent ac37abcb36
commit bc77b3680f
5 changed files with 22 additions and 22 deletions

View File

@ -16,10 +16,9 @@ env:
matrix:
exclude:
- os: osx
- compiler: gcc
compiler: gcc
before_install:
- cmake --version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository ppa:kubuntu-ppa/backports -y; fi;
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi;
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake valgrind; fi;
@ -27,6 +26,7 @@ before_install:
before_script:
- mkdir build
- cd build
- cmake --version
- cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DASMJIT_BUILD_TEST=1 -DASMJIT_BUILD_SAMPLES=1
- cd ..

View File

@ -14,7 +14,7 @@
#include "../x86/x86cpuinfo.h"
#else
// ?
#endif // ASMJIT_HOST || ASMJIT_ARCH_X64
#endif
// [Dependencies - Posix]
#if defined(ASMJIT_OS_POSIX)
@ -62,14 +62,14 @@ struct AutoX86CpuInfo : public X86CpuInfo {
};
#else
#error "AsmJit - Unsupported CPU."
#endif // ASMJIT_HOST || ASMJIT_ARCH_X64
#endif
const CpuInfo* CpuInfo::getHost() {
#if defined(ASMJIT_ARCH_X86) || defined(ASMJIT_ARCH_X64)
static AutoX86CpuInfo cpuInfo;
#else
#error "AsmJit - Unsupported CPU."
#endif // ASMJIT_HOST || ASMJIT_ARCH_X64
#endif
return &cpuInfo;
}

View File

@ -112,7 +112,7 @@ struct IntUtil {
return u0 + (u1 << 8) + (w2 << 16);
#else
return (u0 << 24) + (u1 << 16) + (w2);
#endif // ASMJIT_HOST
#endif
}
//! Pack four 8-bit integer into a 32-bit integer as it is an array of `{u0,u1,u2,u3}`.
@ -121,7 +121,7 @@ struct IntUtil {
return u0 + (u1 << 8) + (u2 << 16) + (u3 << 24);
#else
return (u0 << 24) + (u1 << 16) + (u2 << 8) + u3;
#endif // ASMJIT_HOST
#endif
}
//! Pack two 32-bit integer into a 64-bit integer as it is an array of `{u0,u1}`.
@ -130,7 +130,7 @@ struct IntUtil {
return (static_cast<uint64_t>(u1) << 32) + u0;
#else
return (static_cast<uint64_t>(u0) << 32) + u1;
#endif // ASMJIT_HOST
#endif
}
// --------------------------------------------------------------------------

View File

@ -180,7 +180,7 @@ struct Operand {
uint8_t type;
//! Register index.
uint8_t index;
#endif // ASMJIT_HOST
#endif
};
};

View File

@ -28,19 +28,19 @@ static void dumpCpu(void) {
const CpuInfo* cpu = CpuInfo::getHost();
INFO("Host CPU Info:");
INFO(" Vendor string : %s", cpu->getVendorString());
INFO(" Brand string : %s", cpu->getBrandString());
INFO(" Family : %u", cpu->getFamily());
INFO(" Model : %u", cpu->getModel());
INFO(" Stepping : %u", cpu->getStepping());
INFO(" HW-Threads Count : %u", cpu->getHwThreadsCount());
INFO(" Vendor string : %s", cpu->getVendorString());
INFO(" Brand string : %s", cpu->getBrandString());
INFO(" Family : %u", cpu->getFamily());
INFO(" Model : %u", cpu->getModel());
INFO(" Stepping : %u", cpu->getStepping());
INFO(" HW-Threads Count : %u", cpu->getHwThreadsCount());
INFO("");
// --------------------------------------------------------------------------
// [X86]
// --------------------------------------------------------------------------
#if defined(ASMJIT_HOST_X86) || defined(ASMJIT_HOST_X64)
#if defined(ASMJIT_ARCH_X86) || defined(ASMJIT_ARCH_X64)
const X86CpuInfo* x86Cpu = static_cast<const X86CpuInfo*>(cpu);
static const DumpCpuFeature x86FeaturesList[] = {
@ -105,16 +105,16 @@ static void dumpCpu(void) {
};
INFO("Host CPU Info (X86/X64):");
INFO(" Processor Type : %u", x86Cpu->getProcessorType());
INFO(" Brand Index : %u", x86Cpu->getBrandIndex());
INFO(" CL Flush Cache Line : %u", x86Cpu->getFlushCacheLineSize());
INFO(" Max logical Processors: %u", x86Cpu->getMaxLogicalProcessors());
INFO(" Processor Type : %u", x86Cpu->getProcessorType());
INFO(" Brand Index : %u", x86Cpu->getBrandIndex());
INFO(" CL Flush Cache Line : %u", x86Cpu->getFlushCacheLineSize());
INFO(" Max logical Processors : %u", x86Cpu->getMaxLogicalProcessors());
INFO("");
INFO("Host CPU Features (X86/X64):");
dumpCpuFeatures(x86Cpu, x86FeaturesList, ASMJIT_ARRAY_SIZE(x86FeaturesList));
INFO("");
#endif // ASMJIT_HOST || ASMJIT_HOST_X64
#endif
}
// ============================================================================
@ -122,7 +122,7 @@ static void dumpCpu(void) {
// ============================================================================
#define DUMP_TYPE(_Type_) \
INFO(" %-31s: %u", #_Type_, static_cast<uint32_t>(sizeof(_Type_)))
INFO(" %-27s: %u", #_Type_, static_cast<uint32_t>(sizeof(_Type_)))
static void dumpSizeOf(void) {
INFO("SizeOf Types:");