From 4a5140cc1ebf57fbae15d268d5c553500e077dbe Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 31 Aug 2015 16:18:51 +0200 Subject: mcode: fix crash wrt oe_shl. --- src/ortho/mcode/ortho_code-x86-insns.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ortho/mcode') diff --git a/src/ortho/mcode/ortho_code-x86-insns.adb b/src/ortho/mcode/ortho_code-x86-insns.adb index f96887436..c3d673041 100644 --- a/src/ortho/mcode/ortho_code-x86-insns.adb +++ b/src/ortho/mcode/ortho_code-x86-insns.adb @@ -1557,10 +1557,13 @@ package body Ortho_Code.X86.Insns is and then Get_Expr_Kind (Right) = OE_Const and then Get_Expr_Low (Right) in 0 .. 3 then + -- Becomes the index of the SIB. Set_Expr_Reg (Stmt, R_I); else + Reg_Res := Get_Expr_Reg (Left); + Set_Expr_Reg (Stmt, Reg_Res); + Renum_Reg (Reg_Res, Stmt, Pnum); Link_Stmt (Stmt); - Set_Expr_Reg (Stmt, Get_Expr_Reg (Left)); Free_Insn_Regs (Right); end if; return Stmt; -- cgit v1.2.3