ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
CoreDSLCoverage.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
6
7#include <cstdarg>
8#include <map>
9
11#include "etiss/jit/Coverage.h"
12
13void vetiss_coverage_count(int count, va_list args);
14
15#ifdef ETISS_USE_COREDSL_COVERAGE
16extern "C"
17{
18 void etiss_coverage_count(int count, ...)
19 {
20 std::va_list args;
21 va_start(args, count);
22 vetiss_coverage_count(count, args);
23 va_end(args);
24 }
25}
26#endif
27
28std::map<int, int> coverage_map;
29
30void vetiss_coverage_count(int count, va_list args)
31{
32 for (int i = 0; i < count; i++)
33 {
34 coverage_map[va_arg(args, int)]++;
35 }
36}
void vetiss_coverage_count(int count, va_list args)
std::map< int, int > coverage_map
#define etiss_coverage_count(...)
Definition Coverage.h:18
#define va_arg(ap, type)
Definition stdarg.h:19
#define va_start(ap, param)
Definition stdarg.h:17
#define va_end(ap)
Definition stdarg.h:18
__builtin_va_list va_list
Definition stdarg.h:14