mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 00:59:27 +02:00
m68k: fixed the signedness of conditional jumps while creating the jump list for case statements
git-svn-id: trunk@36210 -
This commit is contained in:
parent
0f16f6d94d
commit
ca1ec0435d
@ -75,6 +75,7 @@ unit cgcpu;
|
||||
procedure a_jmp_name(list : TAsmList;const s : string); override;
|
||||
procedure a_jmp_always(list : TAsmList;l: tasmlabel); override;
|
||||
procedure a_jmp_flags(list : TAsmList;const f : TResFlags;l: tasmlabel); override;
|
||||
procedure a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
|
||||
procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister); override;
|
||||
|
||||
procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);override;
|
||||
@ -106,8 +107,6 @@ unit cgcpu;
|
||||
procedure call_rtl_mul_const_reg(list:tasmlist;size:tcgsize;a:tcgint;reg:tregister;const name:string);
|
||||
procedure call_rtl_mul_reg_reg(list:tasmlist;reg1,reg2:tregister;const name:string);
|
||||
procedure check_register_size(size:tcgsize;reg:tregister);
|
||||
private
|
||||
procedure a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
|
||||
end;
|
||||
|
||||
tcg64f68k = class(tcg64f32)
|
||||
|
@ -45,7 +45,7 @@ implementation
|
||||
aasmtai,aasmdata,
|
||||
nflw,constexp,
|
||||
cgutils,cgobj,hlcgobj,
|
||||
defutil;
|
||||
defutil,cgcpu;
|
||||
|
||||
procedure tcpucasenode.genlinearlist(hp : pcaselabel);
|
||||
|
||||
@ -71,7 +71,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
hlcg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, tcgint(t^._low.svalue-last.svalue), hregister);
|
||||
hlcg.a_jmp_flags(current_asmdata.CurrAsmList,F_E,blocklabel(t^.blockid));
|
||||
tcg68k(cg).a_jmp_cond(current_asmdata.CurrAsmList,OC_EQ,blocklabel(t^.blockid));
|
||||
end;
|
||||
last:=t^._low;
|
||||
end
|
||||
@ -92,10 +92,10 @@ implementation
|
||||
{ present label then the lower limit can be checked }
|
||||
{ immediately. else check the range in between: }
|
||||
hlcg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, tcgint(t^._low.svalue-last.svalue), hregister);
|
||||
hlcg.a_jmp_flags(current_asmdata.CurrAsmList,F_L,elselabel);
|
||||
tcg68k(cg).a_jmp_cond(current_asmdata.CurrAsmList, jmp_lt, elselabel);
|
||||
end;
|
||||
hlcg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, tcgint(t^._high.svalue-t^._low.svalue), hregister);
|
||||
hlcg.a_jmp_flags(current_asmdata.CurrAsmList,F_LE,blocklabel(t^.blockid));
|
||||
tcg68k(cg).a_jmp_cond(current_asmdata.CurrAsmList, jmp_le, blocklabel(t^.blockid));
|
||||
last:=t^._high;
|
||||
end;
|
||||
first:=false;
|
||||
|
Loading…
Reference in New Issue
Block a user