mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 17:40:28 +02:00
* fix tthumbcgarm.g_flags2reg, mov reg,#imm for thumb updates the flags
git-svn-id: trunk@25426 -
This commit is contained in:
parent
5039ddc4a7
commit
36e6f99843
@ -4123,17 +4123,20 @@ unit cgcpu;
|
|||||||
|
|
||||||
procedure tthumbcgarm.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
|
procedure tthumbcgarm.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
|
||||||
var
|
var
|
||||||
l : tasmlabel;
|
l1,l2 : tasmlabel;
|
||||||
ai : taicpu;
|
ai : taicpu;
|
||||||
begin
|
begin
|
||||||
current_asmdata.getjumplabel(l);
|
current_asmdata.getjumplabel(l1);
|
||||||
list.concat(taicpu.op_reg_const(A_MOV,reg,1));
|
current_asmdata.getjumplabel(l2);
|
||||||
ai:=setcondition(taicpu.op_sym(A_B,l),flags_to_cond(f));
|
ai:=setcondition(taicpu.op_sym(A_B,l1),flags_to_cond(f));
|
||||||
ai.is_jmp:=true;
|
ai.is_jmp:=true;
|
||||||
list.concat(ai);
|
list.concat(ai);
|
||||||
list.concat(taicpu.op_reg_const(A_MOV,reg,0));
|
list.concat(taicpu.op_reg_const(A_MOV,reg,0));
|
||||||
|
list.concat(taicpu.op_sym(A_B,l2));
|
||||||
|
cg.a_label(list,l1);
|
||||||
|
list.concat(taicpu.op_reg_const(A_MOV,reg,1));
|
||||||
a_reg_dealloc(list,NR_DEFAULTFLAGS);
|
a_reg_dealloc(list,NR_DEFAULTFLAGS);
|
||||||
cg.a_label(list,l);
|
cg.a_label(list,l2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user