mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 15:09:14 +02:00
+ implemented tcgavr.g_flags2reg
git-svn-id: branches/avr@17290 -
This commit is contained in:
parent
ed8d652398
commit
7b8f3a61d3
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user