From 5968495a551b97d40528c87c1ee789d57e4ef8b8 Mon Sep 17 00:00:00 2001 From: phani Date: Fri, 20 Dec 2019 14:18:00 -0500 Subject: [PATCH] adds floor for float and double --- runtime/compiletime/instr.c | 14 ++++++++++++++ silverfish | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/runtime/compiletime/instr.c b/runtime/compiletime/instr.c index 74c9e20..d08874b 100644 --- a/runtime/compiletime/instr.c +++ b/runtime/compiletime/instr.c @@ -186,6 +186,12 @@ f32_max(float a, float b) return a > b ? a : b; } +INLINE float +f32_floor(float a) +{ + return floor(a); +} + INLINE double f64_min(double a, double b) { @@ -197,3 +203,11 @@ f64_max(double a, double b) { return a > b ? a : b; } + +INLINE double +f64_floor(double a) +{ + return floor(a); +} + + diff --git a/silverfish b/silverfish index 015e2bb..6e82f8e 160000 --- a/silverfish +++ b/silverfish @@ -1 +1 @@ -Subproject commit 015e2bb638d47a793d0da96bb4b697be9d010209 +Subproject commit 6e82f8ef3621710037428e50d2d118a0589ad720