aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-static_oper.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-14 09:27:03 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-14 09:27:03 +0100
commitec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f (patch)
tree297a569a7702d28082cf0ca4c420b9a513a485af /src/synth/synth-static_oper.adb
parent6c6852b5864ecfb41f03650277ed9dac397d6f2b (diff)
downloadghdl-ec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f.tar.gz
ghdl-ec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f.tar.bz2
ghdl-ec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f.zip
synth-static_oper: handle minimum/maximum for integers. Fix #1158
Diffstat (limited to 'src/synth/synth-static_oper.adb')
-rw-r--r--src/synth/synth-static_oper.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb
index 251e25693..270260b71 100644
--- a/src/synth/synth-static_oper.adb
+++ b/src/synth/synth-static_oper.adb
@@ -441,12 +441,14 @@ package body Synth.Static_Oper is
when Iir_Predefined_Integer_Exp =>
return Create_Value_Discrete
(Left.Scal ** Natural (Right.Scal), Res_Typ);
- when Iir_Predefined_Physical_Minimum =>
+ when Iir_Predefined_Physical_Minimum
+ | Iir_Predefined_Integer_Minimum =>
return Create_Value_Discrete
(Int64'Min (Get_Static_Discrete (Left),
Get_Static_Discrete (Right)),
Res_Typ);
- when Iir_Predefined_Physical_Maximum =>
+ when Iir_Predefined_Physical_Maximum
+ | Iir_Predefined_Integer_Maximum =>
return Create_Value_Discrete
(Int64'Max (Get_Static_Discrete (Left),
Get_Static_Discrete (Right)),