diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-08-31 16:18:51 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-08-31 16:18:51 +0200 |
commit | 4a5140cc1ebf57fbae15d268d5c553500e077dbe (patch) | |
tree | 0e52d2af078acac1e81f140dce7af21ec18e1fd1 /src/ortho | |
parent | 9ee4eb7cae2660b648105eb00486e561002ae1a7 (diff) | |
download | ghdl-4a5140cc1ebf57fbae15d268d5c553500e077dbe.tar.gz ghdl-4a5140cc1ebf57fbae15d268d5c553500e077dbe.tar.bz2 ghdl-4a5140cc1ebf57fbae15d268d5c553500e077dbe.zip |
mcode: fix crash wrt oe_shl.
Diffstat (limited to 'src/ortho')
-rw-r--r-- | src/ortho/mcode/ortho_code-x86-insns.adb | 5 |
1 files changed, 4 insertions, 1 deletions
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; |