+ implemented tcgz80.g_flags2reg

git-svn-id: branches/z80@44696 -
This commit is contained in:
nickysn 2020-04-12 02:21:03 +00:00
parent 00f7fad1a6
commit 90e2b9ecc6

View File

@ -1644,25 +1644,23 @@ unit cgcpu;
l : TAsmLabel; l : TAsmLabel;
tmpflags : TResFlags; tmpflags : TResFlags;
begin begin
list.Concat(tai_comment.Create(strpnew('WARNING! not implemented: g_flags2reg'))); if f in [F_C,F_NC] then
current_asmdata.getjumplabel(l);
{
if flags_to_cond(f) then
begin begin
tmpflags:=f; a_load_const_reg(list,size,0,reg);
inverse_flags(tmpflags); if f=F_NC then
emit_mov(reg,NR_R1); list.concat(taicpu.op_none(A_CCF));
a_jmp_flags(list,tmpflags,l); list.concat(taicpu.op_reg(A_RL,reg));
list.concat(taicpu.op_reg_const(A_LDI,reg,1));
end end
else else
}
begin begin
//list.concat(taicpu.op_reg_const(A_LDI,reg,1)); current_asmdata.getjumplabel(l);
//a_jmp_flags(list,f,l); a_load_const_reg(list,size,0,reg);
//emit_mov(list,reg,NR_R1); tmpflags:=f;
inverse_flags(tmpflags);
a_jmp_flags(list,tmpflags,l);
list.concat(taicpu.op_reg(A_INC,reg));
cg.a_label(list,l);
end; end;
cg.a_label(list,l);
end; end;