diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-11 15:36:20 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-11 15:36:20 +0200 |
commit | 163a3c210504373b3348c4d9ddfad0ee19439f6b (patch) | |
tree | ce191840151ff69cb07dbb3c9e8a180d05dbe222 /src/synth | |
parent | aecf3b2208358bb60ab27c17fadcdedf137be2c8 (diff) | |
download | ghdl-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.adb | 7 |
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; |