diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-14 07:56:43 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-14 07:56:43 +0100 |
commit | ea76787585564f7ebb113d3989f87d34d0a4e7f7 (patch) | |
tree | 9ed67775d9e73e975200f4ce1c65c0f83feb3d52 /src/synth/synth-stmts.adb | |
parent | 559c6166f3c639330502f714babddb0bd6d986b4 (diff) | |
download | ghdl-ea76787585564f7ebb113d3989f87d34d0a4e7f7.tar.gz ghdl-ea76787585564f7ebb113d3989f87d34d0a4e7f7.tar.bz2 ghdl-ea76787585564f7ebb113d3989f87d34d0a4e7f7.zip |
synth: preliminary work to support intrinsic procedures.
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r-- | src/synth/synth-stmts.adb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index e969cf11a..393d415b5 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -1586,16 +1586,19 @@ package body Synth.Stmts is Imp : constant Node := Get_Implementation (Call); Res : Value_Acc; begin - if Get_Implicit_Definition (Imp) in Iir_Predefined_Implicit then - Error_Msg_Synth (+Stmt, "call to implicit %n is not supported", +Imp); - return; - elsif Get_Foreign_Flag (Imp) then - Error_Msg_Synth (+Stmt, "call to foreign %n is not supported", +Imp); - return; - end if; - - Res := Synth_Subprogram_Call (Syn_Inst, Call); - pragma Assert (Res = null); + case Get_Implicit_Definition (Imp) is + when Iir_Predefined_None => + if Get_Foreign_Flag (Imp) then + Error_Msg_Synth + (+Stmt, "call to foreign %n is not supported", +Imp); + else + Res := Synth_Subprogram_Call (Syn_Inst, Call); + pragma Assert (Res = null); + end if; + when others => + Error_Msg_Synth + (+Stmt, "call to implicit %n is not supported", +Imp); + end case; end Synth_Procedure_Call; function In_Range (Rng : Discrete_Range_Type; V : Int64) return Boolean is |