aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-static_oper.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-02-12 06:23:06 +0100
committerTristan Gingold <tgingold@free.fr>2020-02-12 06:23:06 +0100
commit5bcc890fe425ca6d63e12f4d462c63fb36c7c6e7 (patch)
treefad7a766d412ac393d60f459acbcd43ca655a9b5 /src/synth/synth-static_oper.adb
parent2cbdb96ba311d269035e5a673a0f0258cfbc400b (diff)
downloadghdl-5bcc890fe425ca6d63e12f4d462c63fb36c7c6e7.tar.gz
ghdl-5bcc890fe425ca6d63e12f4d462c63fb36c7c6e7.tar.bz2
ghdl-5bcc890fe425ca6d63e12f4d462c63fb36c7c6e7.zip
synth-static_oper: handle more division operands. Fix #1134
From donnie-j
Diffstat (limited to 'src/synth/synth-static_oper.adb')
-rw-r--r--src/synth/synth-static_oper.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb
index be4857990..3bf2a1b9f 100644
--- a/src/synth/synth-static_oper.adb
+++ b/src/synth/synth-static_oper.adb
@@ -331,7 +331,8 @@ package body Synth.Static_Oper is
Res_Typ);
when Iir_Predefined_Integer_Div =>
return Create_Value_Discrete
- (Left.Scal / Right.Scal, Res_Typ);
+ (Get_Static_Discrete (Left) / Get_Static_Discrete (Right),
+ Res_Typ);
when Iir_Predefined_Integer_Mod =>
return Create_Value_Discrete
(Get_Static_Discrete (Left) mod Get_Static_Discrete (Right),