aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-10-02 13:57:49 +0200
committerTristan Gingold <tgingold@free.fr>2022-10-02 13:57:49 +0200
commit298fa787da01ded60f2b9d02c9529760aabd2921 (patch)
treef8697578f8ac6011720f561d5ecc5074849ae142 /src/ghdldrv
parent7d642ac4d912c4111769f124a2da97fa83828548 (diff)
downloadghdl-298fa787da01ded60f2b9d02c9529760aabd2921.tar.gz
ghdl-298fa787da01ded60f2b9d02c9529760aabd2921.tar.bz2
ghdl-298fa787da01ded60f2b9d02c9529760aabd2921.zip
translate, grt: add lib function for div and rem.
Do not rely on hardware exceptions to catch division by 0, they are caught in windows by the c handler and not propagated
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlrun.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index bfa095307..3f96bf456 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -386,6 +386,14 @@ package body Ghdlrun is
Grt.Lib.Ghdl_I32_Exp'Address);
Def (Trans_Decls.Ghdl_I64_Exp,
Grt.Lib.Ghdl_I64_Exp'Address);
+ Def (Trans_Decls.Ghdl_I32_Div,
+ Grt.Lib.Ghdl_I32_Div'Address);
+ Def (Trans_Decls.Ghdl_I64_Div,
+ Grt.Lib.Ghdl_I64_Div'Address);
+ Def (Trans_Decls.Ghdl_I32_Mod,
+ Grt.Lib.Ghdl_I32_Mod'Address);
+ Def (Trans_Decls.Ghdl_I64_Mod,
+ Grt.Lib.Ghdl_I64_Mod'Address);
Def (Trans_Decls.Ghdl_Check_Stack_Allocation,
Grt.Lib.Ghdl_Check_Stack_Allocation'Address);