+ implemented tcgavr.g_flags2reg

git-svn-id: branches/avr@17290 -
This commit is contained in:
florian 2011-04-10 18:39:51 +00:00
parent ed8d652398
commit 7b8f3a61d3

View File

@ -1156,8 +1156,26 @@ unit cgcpu;
procedure tcgavr.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
var
l : TAsmLabel;
tmpflags : TResFlags;
begin
{ TODO : implement g_flags2reg }
current_asmdata.getjumplabel(l);
if flags_to_cond(f) then
begin
tmpflags:=f;
inverse_flags(tmpflags);
list.concat(taicpu.op_reg(A_CLR,reg));
a_jmp_flags(list,tmpflags,l);
list.concat(taicpu.op_const_reg(A_LDI,reg,1));
end
else
begin;
list.concat(taicpu.op_const_reg(A_LDI,reg,1));
a_jmp_flags(list,f,l);
list.concat(taicpu.op_reg(A_CLR,reg));
end;
cg.a_label(list,l);
end;