diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-04-26 10:27:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-04-26 10:27:55 +0200 |
commit | 2a88c029c704fa67f10c10f78b0ce3eac9044b81 (patch) | |
tree | d4d781fa088cd909560ebd10eed923b5c0a89964 /src/synth/synth-static_oper.adb | |
parent | 3d36abb3be72ade207ec63982098a1f40d59428e (diff) | |
download | ghdl-2a88c029c704fa67f10c10f78b0ce3eac9044b81.tar.gz ghdl-2a88c029c704fa67f10c10f78b0ce3eac9044b81.tar.bz2 ghdl-2a88c029c704fa67f10c10f78b0ce3eac9044b81.zip |
synth: abstract code for reuse by evaluation
Diffstat (limited to 'src/synth/synth-static_oper.adb')
-rw-r--r-- | src/synth/synth-static_oper.adb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index 6d07c1087..504e49c04 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -671,7 +671,6 @@ package body Synth.Static_Oper is function Synth_Static_Monadic_Predefined (Imp : Node; Operand : Memtyp; - Oper_Typ : Type_Acc; Expr : Node) return Memtyp is Def : constant Iir_Predefined_Functions := @@ -680,25 +679,26 @@ package body Synth.Static_Oper is case Def is when Iir_Predefined_Boolean_Not | Iir_Predefined_Bit_Not => - return Create_Memory_U8 (1 - Read_U8 (Operand), Oper_Typ); + return Create_Memory_U8 (1 - Read_U8 (Operand), Operand.Typ); when Iir_Predefined_Integer_Negation | Iir_Predefined_Physical_Negation => - return Create_Memory_Discrete (-Read_Discrete (Operand), Oper_Typ); + return Create_Memory_Discrete + (-Read_Discrete (Operand), Operand.Typ); when Iir_Predefined_Integer_Absolute | Iir_Predefined_Physical_Absolute => return Create_Memory_Discrete - (abs Read_Discrete(Operand), Oper_Typ); + (abs Read_Discrete(Operand), Operand.Typ); when Iir_Predefined_Integer_Identity | Iir_Predefined_Physical_Identity => return Operand; when Iir_Predefined_Floating_Negation => - return Create_Memory_Fp64 (-Read_Fp64 (Operand), Oper_Typ); + return Create_Memory_Fp64 (-Read_Fp64 (Operand), Operand.Typ); when Iir_Predefined_Floating_Identity => return Operand; when Iir_Predefined_Floating_Absolute => - return Create_Memory_Fp64 (abs Read_Fp64 (Operand), Oper_Typ); + return Create_Memory_Fp64 (abs Read_Fp64 (Operand), Operand.Typ); when Iir_Predefined_Ieee_1164_Condition_Operator => -- Constant std_logic: need to convert. @@ -722,7 +722,7 @@ package body Synth.Static_Oper is when Iir_Predefined_Ieee_1164_Scalar_Not => return Create_Memory_U8 (Std_Ulogic'Pos (Not_Table (Read_Std_Logic (Operand.Mem, 0))), - Oper_Typ); + Operand.Typ); when Iir_Predefined_Ieee_Numeric_Std_And_Uns => return Synth_Vector_Reduce ('1', Operand, And_Table); |