* Using x86-specific capability of shifting with carry flag helps to reduce amount of instructions.

git-svn-id: trunk@27899 -
This commit is contained in:
sergei 2014-06-08 14:01:41 +00:00
parent 1ebff1a963
commit ed46a07f62

View File

@ -184,9 +184,10 @@ implementation
cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
if m_add then
begin
emit_reg_reg(A_SUB,S_L,NR_EDX,hreg1);
emit_const_reg(A_SHR,S_L,1,hreg1);
{ addition can overflow, shift first bit considering carry,
then shift remaining bits in regular way. }
emit_reg_reg(A_ADD,S_L,hreg1,NR_EDX);
emit_const_reg(A_RCR,S_L,1,NR_EDX);
dec(s);
end;
if s<>0 then