aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/mcode')
-rw-r--r--src/ortho/mcode/ortho_code-x86-emits.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ortho/mcode/ortho_code-x86-emits.adb b/src/ortho/mcode/ortho_code-x86-emits.adb
index 28f621af2..0e62eb6e3 100644
--- a/src/ortho/mcode/ortho_code-x86-emits.adb
+++ b/src/ortho/mcode/ortho_code-x86-emits.adb
@@ -2267,8 +2267,14 @@ package body Ortho_Code.X86.Emits is
Gen_Mul (Stmt, Sz_32);
when Mode_I32 =>
Gen_Grp3_Insn (Opc2_Grp3_Imul, Get_Expr_Right (Stmt), Sz_32);
+ if Kind = OE_Mul_Ov then
+ Gen_Check_Overflow (Mode);
+ end if;
when Mode_I64 =>
Gen_Grp3_Insn (Opc2_Grp3_Imul, Get_Expr_Right (Stmt), Sz_64);
+ if Kind = OE_Mul_Ov then
+ Gen_Check_Overflow (Mode);
+ end if;
when Mode_U64 =>
pragma Assert (Flags.M64);
Gen_Mul (Stmt, Sz_64);