From 2459518bdd903203fce4bb408d0bf09be8b648c2 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sat, 18 Jan 2014 03:36:15 +0000 Subject: [PATCH] * use IMUL even for unsigned multiplication on x86_64, when overflow checking is off git-svn-id: trunk@26499 - --- compiler/x86_64/nx64add.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/x86_64/nx64add.pas b/compiler/x86_64/nx64add.pas index b3317ac1f0..ecac934de9 100644 --- a/compiler/x86_64/nx64add.pas +++ b/compiler/x86_64/nx64add.pas @@ -49,8 +49,10 @@ interface procedure tx8664addnode.second_addordinal; begin - { filter unsigned MUL opcode, which requires special handling } + { filter unsigned MUL opcode, which requires special handling. + Note that when overflow checking is off, we can use IMUL instead. } if (nodetype=muln) and + (cs_check_overflow in current_settings.localswitches) and (not(is_signed(left.resultdef)) or not(is_signed(right.resultdef))) then begin