Skip to content

Commit

Permalink
Remove unused 'isnanf' and 'isinff' functions
Browse files Browse the repository at this point in the history
The introduction of SoftFloat for F extension implementation renders
'isnanf' and 'isinff' functions unnecessary. These functions were
causing compilation warnings due to being unused.

The commit addresses the following warnings:
src/emulate.c:18:19: warning: unused function 'isinff' [-Wunused-function]
static inline int isinff(float x)
^
src/emulate.c:22:19: warning: unused function 'isnanf' [-Wunused-function]
static inline int isnanf(float x)
^
2 warnings generated.

This removal eliminates the redundant functions, ensuring a cleaner
codebase and resolving the compilation warnings.
  • Loading branch information
visitorckw committed Nov 11, 2023
1 parent 531ad51 commit 45bf7e2
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@
#if RV32_HAS(EXT_F)
#include <math.h>
#include "softfloat.h"

#if defined(__APPLE__)
static inline int isinff(float x)
{
return __builtin_fabsf(x) == __builtin_inff();
}
static inline int isnanf(float x)
{
return x != x;
}
#endif
#endif /* RV32_HAS(EXT_F) */

#if RV32_HAS(GDBSTUB)
Expand Down

1 comment on commit 45bf7e2

@jserv
Copy link
Contributor

@jserv jserv commented on 45bf7e2 Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks

Benchmark suite Current: 45bf7e2 Previous: 9ebd8fa Ratio
Dhrystone 1567 Average DMIPS over 10 runs 1736.33 Average DMIPS over 10 runs 1.11
Coremark 1149.915 Average iterations/sec over 10 runs 1478.631 Average iterations/sec over 10 runs 1.29

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.