aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-11 15:36:20 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-11 15:36:20 +0200
commit163a3c210504373b3348c4d9ddfad0ee19439f6b (patch)
treece191840151ff69cb07dbb3c9e8a180d05dbe222 /src/synth
parentaecf3b2208358bb60ab27c17fadcdedf137be2c8 (diff)
downloadghdl-163a3c210504373b3348c4d9ddfad0ee19439f6b.tar.gz
ghdl-163a3c210504373b3348c4d9ddfad0ee19439f6b.tar.bz2
ghdl-163a3c210504373b3348c4d9ddfad0ee19439f6b.zip
synth-static_oper: handle floor. Fix #1210
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-static_oper.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb
index 2443e7ee2..824e5c803 100644
--- a/src/synth/synth-static_oper.adb
+++ b/src/synth/synth-static_oper.adb
@@ -1147,6 +1147,13 @@ package body Synth.Static_Oper is
begin
return Create_Value_Float (Ceil (Read_Fp64 (Param1)), Res_Typ);
end;
+ when Iir_Predefined_Ieee_Math_Real_Floor =>
+ declare
+ function Floor (Arg : Fp64) return Fp64;
+ pragma Import (C, Floor);
+ begin
+ return Create_Value_Float (Floor (Read_Fp64 (Param1)), Res_Typ);
+ end;
when Iir_Predefined_Ieee_Math_Real_Round =>
declare
function Round (Arg : Fp64) return Fp64;