mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:29:14 +02:00
+ make use of the 3-operand form of IMUL on i386 and x86_64
git-svn-id: trunk@26508 -
This commit is contained in:
parent
1de847c754
commit
cc1faad3d2
@ -1584,6 +1584,14 @@ unit cgx86;
|
|||||||
href.scalefactor:=a;
|
href.scalefactor:=a;
|
||||||
list.concat(taicpu.op_ref_reg(A_LEA,TCgSize2OpSize[size],href,dst));
|
list.concat(taicpu.op_ref_reg(A_LEA,TCgSize2OpSize[size],href,dst));
|
||||||
end
|
end
|
||||||
|
else if (op in [OP_MUL,OP_IMUL]) and (size in [OS_32,OS_S32,OS_64,OS_S64]) and
|
||||||
|
(a>1) and not ispowerof2(int64(a),power) then
|
||||||
|
begin
|
||||||
|
{ MUL with overflow checking should be handled specifically in the code generator }
|
||||||
|
if (op=OP_MUL) and (cs_check_overflow in current_settings.localswitches) then
|
||||||
|
internalerror(2014011801);
|
||||||
|
list.concat(taicpu.op_const_reg_reg(A_IMUL,TCgSize2OpSize[size],a,src,dst));
|
||||||
|
end
|
||||||
else if (op=OP_ADD) and
|
else if (op=OP_ADD) and
|
||||||
((size in [OS_32,OS_S32]) or
|
((size in [OS_32,OS_S32]) or
|
||||||
{ lea supports only 32 bit signed displacments }
|
{ lea supports only 32 bit signed displacments }
|
||||||
|
Loading…
Reference in New Issue
Block a user