diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-21 08:04:12 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-21 08:04:12 +0200 |
commit | 644dbe16d9c55def0fef1df1c333ff9bd8da52f2 (patch) | |
tree | 411b9c3916a18424f2bcfbdd6e2f52a68b829c31 | |
parent | 22d6f529f6bc502e4a547b5dfe90091caa8bb243 (diff) | |
download | ghdl-644dbe16d9c55def0fef1df1c333ff9bd8da52f2.tar.gz ghdl-644dbe16d9c55def0fef1df1c333ff9bd8da52f2.tar.bz2 ghdl-644dbe16d9c55def0fef1df1c333ff9bd8da52f2.zip |
synth-vhdl_expr: avoid a memocy copy
-rw-r--r-- | src/synth/synth-vhdl_expr.adb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index 1f28e3fb2..cd6a25459 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -2218,10 +2218,14 @@ package body Synth.Vhdl_Expr is -- Propagate error. return No_Valtyp; end if; + if Base.Val.Kind = Value_Signal + and then Hook_Signal_Expr /= null + then + Base := Hook_Signal_Expr (Base); + end if; if Dyn.Voff = No_Net and then Is_Static (Base.Val) then - Res := Create_Value_Memory (Typ); - Copy_Memory - (Res.Val.Mem, Base.Val.Mem + Off.Mem_Off, Typ.Sz); + Res := Create_Value_Memtyp + ((Typ, Base.Val.Mem + Off.Mem_Off)); return Res; end if; return Synth_Read_Memory |