MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / run

Method run

lib/asmjit/asmjit-testing/tests/asmjit_test_compiler.cpp:96–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96int TestApp::run() {
97#ifndef ASMJIT_NO_LOGGING
98 FormatOptions format_options;
99 format_options.add_flags(
100 FormatFlags::kMachineCode |
101 FormatFlags::kShowAliases |
102 FormatFlags::kExplainImms |
103 FormatFlags::kRegCasts );
104 format_options.set_indentation(FormatIndentationGroup::kCode, 2);
105
106 IndentedStdoutLogger print_logger(4);
107 print_logger.set_options(format_options);
108
109 StringLogger string_logger;
110 string_logger.set_options(format_options);
111
112 auto print_string_logger_content = [&]() {
113 if (!_verbose) {
114 printf("%s", string_logger.data());
115 fflush(stdout);
116 }
117 };
118#else
119 auto print_string_logger_content = [&]() {};
120#endif // !ASMJIT_NO_LOGGING
121
122 // maybe unused...
123 Support::maybe_unused(print_string_logger_content);
124
125#ifndef ASMJIT_NO_JIT
126 JitRuntime runtime;
127#endif // !ASMJIT_NO_JIT
128
129 PerformanceTimer compile_timer;
130 PerformanceTimer finalize_timer;
131
132 double compile_time = 0;
133 double finalize_time = 0;
134
135 for (std::unique_ptr<TestCase>& test : _tests) {
136 if (!should_run(test.get()))
137 continue;
138
139 _num_tests++;
140
141 for (uint32_t pass = 0; pass < 2; pass++) {
142 bool runnable = false;
143 CodeHolder code;
144 SimpleErrorHandler error_handler;
145
146 const char* status_separator = " ";
147
148 // Filter architecture to run.
149 if (strcmp(_arch, "all") != 0) {
150 switch (test->arch()) {
151 case Arch::kX86:
152 if (strcmp(_arch, "x86") == 0)
153 break;

Callers 1

mainFunction · 0.45

Calls 15

maybe_unusedFunction · 0.85
asmjit_arch_as_stringFunction · 0.85
format_node_listFunction · 0.85
print_indentedFunction · 0.85
set_indentationMethod · 0.80
code_sizeMethod · 0.80
durationMethod · 0.80
append_hexMethod · 0.80
add_flagsMethod · 0.45
dataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected