mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 15:59:45 +02:00
Fixed generation of abs calls for thumb and thumb-2 targets.
git-svn-id: trunk@27926 -
This commit is contained in:
parent
e9f99fb3d2
commit
96b73b0076
@ -382,14 +382,26 @@ implementation
|
||||
opsize : tcgsize;
|
||||
hp : taicpu;
|
||||
begin
|
||||
if GenerateThumbCode then
|
||||
begin
|
||||
inherited second_abs_long;
|
||||
exit;
|
||||
end;
|
||||
|
||||
secondpass(left);
|
||||
opsize:=def_cgsize(left.resultdef);
|
||||
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,true);
|
||||
location:=left.location;
|
||||
location.register:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
|
||||
|
||||
cg.a_reg_alloc(current_asmdata.CurrAsmList,NR_DEFAULTFLAGS);
|
||||
current_asmdata.CurrAsmList.concat(setoppostfix(taicpu.op_reg_reg(A_MOV,location.register,left.location.register), PF_S));
|
||||
|
||||
if GenerateThumb2Code then
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_cond(A_IT,C_MI));
|
||||
|
||||
current_asmdata.CurrAsmList.concat(setcondition(taicpu.op_reg_reg_const(A_RSB,location.register,location.register, 0), C_MI));
|
||||
|
||||
cg.a_reg_dealloc(current_asmdata.CurrAsmList,NR_DEFAULTFLAGS);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user