Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/asmjit/asmjit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkobalicek <kobalicek.petr@gmail.com>2020-06-01 11:16:33 +0300
committerkobalicek <kobalicek.petr@gmail.com>2020-06-01 13:18:01 +0300
commit0e04695f64028034b1376ecf577592992e8552fc (patch)
tree763b3b1e70f4b02c760dced96f5c34b4d53557c8 /test
parentb73830c291531bf9712f3f2df240ca1bda769709 (diff)
Fixed broken CI
Diffstat (limited to 'test')
-rw-r--r--test/asmjit_test_unit.cpp2
-rw-r--r--test/asmjit_test_x86_instinfo.cpp13
-rw-r--r--test/asmjit_test_x86_sections.cpp2
3 files changed, 16 insertions, 1 deletions
diff --git a/test/asmjit_test_unit.cpp b/test/asmjit_test_unit.cpp
index bb75f7a..3aac740 100644
--- a/test/asmjit_test_unit.cpp
+++ b/test/asmjit_test_unit.cpp
@@ -72,6 +72,7 @@ static void dumpCpu(void) noexcept {
// [CPU Features]
// --------------------------------------------------------------------------
+#ifndef ASMJIT_NO_LOGGING
INFO("CPU Features:");
BaseFeatures::Iterator it(cpu.features().iterator());
while (it.hasNext()) {
@@ -81,6 +82,7 @@ static void dumpCpu(void) noexcept {
INFO(" %s\n", featureString.data());
};
INFO("");
+#endif // !ASMJIT_NO_LOGGING
}
// ============================================================================
diff --git a/test/asmjit_test_x86_instinfo.cpp b/test/asmjit_test_x86_instinfo.cpp
index fea55d5..1d7d500 100644
--- a/test/asmjit_test_x86_instinfo.cpp
+++ b/test/asmjit_test_x86_instinfo.cpp
@@ -29,12 +29,19 @@ using namespace asmjit;
static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount) {
StringTmp<512> sb;
+ // Read & Write Information
+ // ------------------------
+
InstRWInfo rw;
InstAPI::queryRWInfo(arch, inst, operands, opCount, &rw);
sb.append("Instruction:\n");
sb.append(" ");
+#ifndef ASMJIT_NO_LOGGING
Formatter::formatInstruction(sb, 0, nullptr, arch, inst, operands, opCount);
+#else
+ sb.append("<Logging-Not-Available>");
+#endif
sb.append("\n");
sb.append("Operands:\n");
@@ -49,8 +56,13 @@ static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* opera
sb.append("\n");
}
+ // CPU Features
+ // ------------
+
BaseFeatures features;
InstAPI::queryFeatures(arch, inst, operands, opCount, &features);
+
+#ifndef ASMJIT_NO_LOGGING
if (!features.empty()) {
sb.append("Features:\n");
sb.append(" ");
@@ -66,6 +78,7 @@ static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* opera
}
sb.append("\n");
}
+#endif
printf("%s\n", sb.data());
}
diff --git a/test/asmjit_test_x86_sections.cpp b/test/asmjit_test_x86_sections.cpp
index 6aceae1..ddafd63 100644
--- a/test/asmjit_test_x86_sections.cpp
+++ b/test/asmjit_test_x86_sections.cpp
@@ -55,7 +55,7 @@ static void fail(const char* message, Error err) {
int main() {
printf("AsmJit X86 Sections Test\n\n");
- Environment env(Environment::kArchHost);
+ Environment env = hostEnvironment();
JitAllocator allocator;
#ifndef ASMJIT_NO_LOGGING