mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 20:05:57 +02:00
+ make use of SHLX/SHRX on CPUs supporting BMI2
git-svn-id: trunk@26635 -
This commit is contained in:
parent
8fba876904
commit
7d7bf1d877
@ -1644,6 +1644,19 @@ unit cgx86;
|
|||||||
href.index:=src2;
|
href.index:=src2;
|
||||||
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_SHR,OP_SHL]) and
|
||||||
|
(CPUX86_HAS_BMI2 in cpu_capabilities[current_settings.cputype]) and
|
||||||
|
(size in [OS_32,OS_S32
|
||||||
|
{$ifdef x86_64}
|
||||||
|
,OS_64,OS_S64
|
||||||
|
{$endif x86_64}
|
||||||
|
]) then
|
||||||
|
begin
|
||||||
|
if op=OP_SHL then
|
||||||
|
list.concat(taicpu.op_reg_reg_reg(A_SHLX,TCgSize2OpSize[size],src1,src2,dst))
|
||||||
|
else
|
||||||
|
list.concat(taicpu.op_reg_reg_reg(A_SHRX,TCgSize2OpSize[size],src1,src2,dst));
|
||||||
|
end
|
||||||
else
|
else
|
||||||
inherited a_op_reg_reg_reg(list,op,size,src1,src2,dst);
|
inherited a_op_reg_reg_reg(list,op,size,src1,src2,dst);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user