mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-06 14:32:35 +02:00
* fixed bug of output generated assembler for a_cmp_const_ref_label
This commit is contained in:
parent
ca247392ff
commit
e3431c55d9
@ -855,13 +855,20 @@ procedure TCgSparc.a_cmp_const_reg_label(list:TAasmOutput;size:tcgsize;cmp_op:to
|
|||||||
a_jmp_cond(list,cmp_op,l);
|
a_jmp_cond(list,cmp_op,l);
|
||||||
end;
|
end;
|
||||||
procedure TCgSparc.a_cmp_const_ref_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;a:aword;const ref:TReference;l:tasmlabel);
|
procedure TCgSparc.a_cmp_const_ref_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;a:aword;const ref:TReference;l:tasmlabel);
|
||||||
|
var
|
||||||
|
cReg,rReg:TRegister;
|
||||||
begin
|
begin
|
||||||
with List do
|
with cg do
|
||||||
begin
|
begin
|
||||||
Concat(taicpu.op_const(A_LD,a));
|
cReg:=get_scratch_reg_int(List,size);
|
||||||
Concat(taicpu.op_ref(A_CMP,ref));
|
rReg:=get_scratch_reg_int(List,size);
|
||||||
end;
|
a_load_const_reg(List,OS_32,a,cReg);
|
||||||
|
a_load_ref_reg(List,OS_32,ref,rReg);
|
||||||
|
List.Concat(taicpu.op_reg_reg(A_CMP,rReg,cReg));
|
||||||
a_jmp_cond(list,cmp_op,l);
|
a_jmp_cond(list,cmp_op,l);
|
||||||
|
free_scratch_reg(List,cReg);
|
||||||
|
free_scratch_reg(List,rReg);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCgSparc.a_cmp_reg_reg_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;
|
procedure TCgSparc.a_cmp_reg_reg_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;
|
||||||
@ -873,14 +880,13 @@ procedure TCgSparc.a_cmp_const_ref_label(list:TAasmOutput;size:tcgsize;cmp_op:to
|
|||||||
list.concat(taicpu.op_reg_reg(A_CMP,regsize(reg1),reg1,reg2));
|
list.concat(taicpu.op_reg_reg(A_CMP,regsize(reg1),reg1,reg2));
|
||||||
a_jmp_cond(list,cmp_op,l);}
|
a_jmp_cond(list,cmp_op,l);}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCgSparc.a_cmp_ref_reg_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;CONST ref:TReference;reg:tregister;l:tasmlabel);
|
procedure TCgSparc.a_cmp_ref_reg_label(list:TAasmOutput;size:tcgsize;cmp_op:topcmp;CONST ref:TReference;reg:tregister;l:tasmlabel);
|
||||||
var
|
var
|
||||||
TempReg:TRegister;
|
TempReg:TRegister;
|
||||||
begin
|
begin
|
||||||
TempReg:=cg.get_scratch_reg_int(List,size);
|
TempReg:=cg.get_scratch_reg_int(List,size);
|
||||||
a_load_ref_reg(list,OS_32,Ref,TempReg);
|
a_load_ref_reg(list,OS_32,Ref,TempReg);
|
||||||
list.concat(taicpu.op_reg_reg(A_SUBcc,TempReg,Reg));
|
list.concat(taicpu.op_reg_reg_reg(A_SUBcc,TempReg,Reg,CpuReg[R_G0]));
|
||||||
a_jmp_cond(list,cmp_op,l);
|
a_jmp_cond(list,cmp_op,l);
|
||||||
cg.free_scratch_reg(exprasmlist,TempReg);
|
cg.free_scratch_reg(exprasmlist,TempReg);
|
||||||
end;
|
end;
|
||||||
@ -1438,7 +1444,10 @@ BEGIN
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.44 2003-04-28 09:44:42 mazen
|
Revision 1.45 2003-04-29 11:58:21 mazen
|
||||||
|
* fixed bug of output generated assembler for a_cmp_const_ref_label
|
||||||
|
|
||||||
|
Revision 1.44 2003/04/28 09:44:42 mazen
|
||||||
+ NOP after conditional jump instruction to prevent delay slot execution
|
+ NOP after conditional jump instruction to prevent delay slot execution
|
||||||
|
|
||||||
Revision 1.43 2003/04/27 11:21:36 peter
|
Revision 1.43 2003/04/27 11:21:36 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user