+ make use of SHLX/SHRX on CPUs supporting BMI2

git-svn-id: trunk@26635 -
This commit is contained in:
florian 2014-01-30 20:24:39 +00:00
parent 8fba876904
commit 7d7bf1d877

View File

@ -1644,6 +1644,19 @@ unit cgx86;
href.index:=src2;
list.concat(taicpu.op_ref_reg(A_LEA,TCgSize2OpSize[size],href,dst));
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
inherited a_op_reg_reg_reg(list,op,size,src1,src2,dst);
end;