From c8150ec75d67a046e9e78b61ba26ad5be5fbe187 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 1 Jan 2014 10:04:27 +0100 Subject: Fix sr2737 (rol/ror with shift = +/- length). --- translate/translation.adb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'translate') diff --git a/translate/translation.adb b/translate/translation.adb index cccecef06..572e2058e 100644 --- a/translate/translation.adb +++ b/translate/translation.adb @@ -17943,9 +17943,17 @@ package body Translation is Finish_If_Stmt (If_Blk); if Shift = Rotation then + -- * If I1 = LENGTH then + -- * I1 := 0 + Start_If_Stmt (If_Blk, New_Compare_Op (ON_Ge, + New_Obj_Value (Var_I1), + New_Obj_Value (Var_Length), + Ghdl_Bool_Type)); + Init_Var (Var_I1); + Finish_If_Stmt (If_Blk); + -- * for I = 0 to LENGTH - 1 loop -- * RES[I] := L[I1]; - Init_Var (Var_I); Start_Loop_Stmt (Label); Gen_Exit_When (Label, New_Compare_Op (ON_Ge, -- cgit v1.2.3