mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
Only enable code coverage counters on linux
This commit is contained in:
parent
bd3dd80526
commit
95f1eb9b87
4 changed files with 6 additions and 6 deletions
|
@ -92,10 +92,10 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi
|
|||
// This is the magic behind the code coverage counters
|
||||
// ---------------------------------------------------
|
||||
|
||||
#ifdef YOSYS_ENABLE_COVER
|
||||
#if defined(YOSYS_ENABLE_COVER) && defined(__linux__)
|
||||
|
||||
#define cover(_id) do { \
|
||||
static CoverData __d YS_ATTRIBUTE(section("yosys_cover_list"), aligned(1), used) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \
|
||||
static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1), used)) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \
|
||||
__d.counter++; \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue