diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-01-17 23:14:17 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-01-17 23:14:17 +0100 |
commit | 548d5aafa4f2f51531f0f991a8725a0ab72b50c8 (patch) | |
tree | 75255281e71f826dfc8c3701d90284307ad7ad65 /kernel | |
parent | db9cf544b8cf4c303610acc59c21a3dec346af62 (diff) | |
download | yosys-548d5aafa4f2f51531f0f991a8725a0ab72b50c8.tar.gz yosys-548d5aafa4f2f51531f0f991a8725a0ab72b50c8.tar.bz2 yosys-548d5aafa4f2f51531f0f991a8725a0ab72b50c8.zip |
Some improvements in log_dump_val_worker() templates
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/log.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/log.h b/kernel/log.h index 5ee6b5651..c4c03352a 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -95,11 +95,16 @@ struct PerformanceTimer // simple API for quickly dumping values when debugging +static inline void log_dump_val_worker(short v) { log("%d", v); } +static inline void log_dump_val_worker(unsigned short v) { log("%u", v); } static inline void log_dump_val_worker(int v) { log("%d", v); } -static inline void log_dump_val_worker(size_t v) { log("%zd", v); } +static inline void log_dump_val_worker(unsigned int v) { log("%u", v); } static inline void log_dump_val_worker(long int v) { log("%ld", v); } +static inline void log_dump_val_worker(unsigned long int v) { log("%lu", v); } static inline void log_dump_val_worker(long long int v) { log("%lld", v); } +static inline void log_dump_val_worker(unsigned long long int v) { log("%lld", v); } static inline void log_dump_val_worker(char c) { log(c >= 32 && c < 127 ? "'%c'" : "'\\x%02x'", c); } +static inline void log_dump_val_worker(unsigned char c) { log(c >= 32 && c < 127 ? "'%c'" : "'\\x%02x'", c); } static inline void log_dump_val_worker(bool v) { log("%s", v ? "true" : "false"); } static inline void log_dump_val_worker(double v) { log("%f", v); } static inline void log_dump_val_worker(const char *v) { log("%s", v); } |