aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_specs.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-30 20:45:57 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-30 20:45:57 +0200
commitd4dc28659c657f14aecd2e6b04d747f36e540bb2 (patch)
treef8ba3ee13c4ded76ad7bfcd9dba06cd47b76896b /src/vhdl/vhdl-sem_specs.adb
parenta35c1cc1b249a16be478ce87747426315ee02817 (diff)
downloadghdl-d4dc28659c657f14aecd2e6b04d747f36e540bb2.tar.gz
ghdl-d4dc28659c657f14aecd2e6b04d747f36e540bb2.tar.bz2
ghdl-d4dc28659c657f14aecd2e6b04d747f36e540bb2.zip
synth: handle read for floats
Diffstat (limited to 'src/vhdl/vhdl-sem_specs.adb')
-rw-r--r--src/vhdl/vhdl-sem_specs.adb20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/vhdl/vhdl-sem_specs.adb b/src/vhdl/vhdl-sem_specs.adb
index 87e576e78..dff9e6da2 100644
--- a/src/vhdl/vhdl-sem_specs.adb
+++ b/src/vhdl/vhdl-sem_specs.adb
@@ -177,9 +177,9 @@ package body Vhdl.Sem_Specs is
return Null_Iir;
end Find_Attribute_Value;
- -- Called for 'Foreign attribute ATTR on procedure DECL.
+ -- Called for 'Foreign attribute ATTR on subprogram DECL.
-- Handle intrinsic subprograms.
- procedure Attribute_Foreign_Procedure (Decl : Iir; Attr : Iir)
+ procedure Attribute_Foreign_Subprogram (Decl : Iir; Attr : Iir)
is
Expr : constant Iir := Get_Expression (Attr);
Intrinsic_Str : constant String := "GHDL intrinsic";
@@ -218,7 +218,7 @@ package body Vhdl.Sem_Specs is
end case;
Set_Implicit_Definition (Decl, Predefined);
end;
- end Attribute_Foreign_Procedure;
+ end Attribute_Foreign_Subprogram;
-- Decorate DECL with attribute ATTR.
-- If CHECK_CLASS is true, class of DECL must be class of ATTR, otherwise
@@ -399,11 +399,15 @@ package body Vhdl.Sem_Specs is
-- Use 'standard' convention call for foreign procedures, so as a
-- consequence they cannot be suspended.
- if Get_Kind (Decl) = Iir_Kind_Procedure_Declaration then
- Set_Suspend_Flag (Decl, False);
-
- Attribute_Foreign_Procedure (Decl, Attr);
- end if;
+ case Get_Kind (Decl) is
+ when Iir_Kind_Procedure_Declaration =>
+ Set_Suspend_Flag (Decl, False);
+ Attribute_Foreign_Subprogram (Decl, Attr);
+ when Iir_Kind_Function_Declaration =>
+ Attribute_Foreign_Subprogram (Decl, Attr);
+ when others =>
+ null;
+ end case;
declare
use Vhdl.Back_End;