* SPARC: convert carry flag into register without branching.

git-svn-id: trunk@27619 -
This commit is contained in:
sergei 2014-04-20 19:30:59 +00:00
parent 1ec5026465
commit f20b6c73ef

View File

@ -934,6 +934,15 @@ implementation
procedure TCgSparc.g_flags2reg(list:TAsmList;Size:TCgSize;const f:tresflags;reg:TRegister);
var
hl : tasmlabel;
begin
if (f in [F_B]) then
list.concat(taicpu.op_reg_reg_reg(A_ADDX,NR_G0,NR_G0,reg))
else if (f in [F_AE]) then
begin
a_load_const_reg(list,size,1,reg);
list.concat(taicpu.op_reg_reg_reg(A_SUBX,reg,NR_G0,reg));
end
else
begin
current_asmdata.getjumplabel(hl);
a_load_const_reg(list,size,1,reg);
@ -941,6 +950,7 @@ implementation
a_load_const_reg(list,size,0,reg);
a_label(list,hl);
end;
end;
procedure tcgsparc.g_overflowCheck(List:TAsmList;const Loc:TLocation;def:TDef);