diff options
author | Pepijn de Vos <pepijndevos@gmail.com> | 2019-10-13 10:43:31 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2019-10-13 10:43:31 +0200 |
commit | 58a211e174a4634a8742ddaddc2cf56613d93bce (patch) | |
tree | 22ce4ab9c8b9c9562f3646d4ee03c0ee88d5e75c /src/synth/synth-oper.adb | |
parent | 966ffd5b0317e61f5b4e48c2e43889d055ddddcc (diff) | |
download | ghdl-58a211e174a4634a8742ddaddc2cf56613d93bce.tar.gz ghdl-58a211e174a4634a8742ddaddc2cf56613d93bce.tar.bz2 ghdl-58a211e174a4634a8742ddaddc2cf56613d93bce.zip |
add record (in)equality (#975)
Diffstat (limited to 'src/synth/synth-oper.adb')
-rw-r--r-- | src/synth/synth-oper.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index c08a85bb3..d6574667b 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -457,7 +457,8 @@ package body Synth.Oper is when Iir_Predefined_Enum_Less_Equal => return Synth_Compare (Id_Ult); - when Iir_Predefined_Array_Equality => + when Iir_Predefined_Array_Equality + | Iir_Predefined_Record_Equality => if Is_Const (Left) and then Is_Const (Right) then return Create_Value_Discrete (Boolean'Pos (Is_Equal (Left, Right)), Boolean_Type); @@ -469,7 +470,8 @@ package body Synth.Oper is return Create_Value_Discrete (0, Boolean_Type); end if; return Synth_Compare (Id_Eq); - when Iir_Predefined_Array_Inequality => + when Iir_Predefined_Array_Inequality + | Iir_Predefined_Record_Inequality => if Is_Const (Left) and then Is_Const (Right) then return Create_Value_Discrete (Boolean'Pos (not Is_Equal (Left, Right)), Boolean_Type); |