mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-07 13:49:44 +01:00
* signed compare fixed
This commit is contained in:
parent
3f97c26b4b
commit
d0e4a452e4
@ -169,7 +169,7 @@ interface
|
|||||||
location_force_fpureg(exprasmlist,right.location,true);
|
location_force_fpureg(exprasmlist,right.location,true);
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags := getresflags(true);
|
location.resflags:=getresflags(true);
|
||||||
|
|
||||||
exprasmlist.concat(taicpu.op_reg_reg(A_FCMPs,
|
exprasmlist.concat(taicpu.op_reg_reg(A_FCMPs,
|
||||||
left.location.register,right.location.register));
|
left.location.register,right.location.register));
|
||||||
@ -194,7 +194,7 @@ interface
|
|||||||
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags := getresflags(true);
|
location.resflags:=getresflags(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -214,24 +214,34 @@ interface
|
|||||||
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags := getresflags(true);
|
location.resflags:=getresflags(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tsparcaddnode.second_cmp64bit;
|
procedure tsparcaddnode.second_cmp64bit;
|
||||||
|
var
|
||||||
|
unsigned : boolean;
|
||||||
begin
|
begin
|
||||||
|
{$warning TODO 64bit compare}
|
||||||
|
unsigned:=not(is_signed(left.resulttype.def)) or
|
||||||
|
not(is_signed(right.resulttype.def));
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags := getresflags(true);
|
location.resflags:=getresflags(unsigned);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tsparcaddnode.second_cmpordinal;
|
procedure tsparcaddnode.second_cmpordinal;
|
||||||
var
|
var
|
||||||
zeroreg : tregister;
|
zeroreg : tregister;
|
||||||
|
unsigned : boolean;
|
||||||
begin
|
begin
|
||||||
pass_left_right;
|
pass_left_right;
|
||||||
force_reg_left_right(true,true);
|
force_reg_left_right(true,true);
|
||||||
|
|
||||||
|
unsigned:=not(is_signed(left.resulttype.def)) or
|
||||||
|
not(is_signed(right.resulttype.def));
|
||||||
|
|
||||||
zeroreg.enum:=R_INTREGISTER;
|
zeroreg.enum:=R_INTREGISTER;
|
||||||
zeroreg.number:=NR_G0;
|
zeroreg.number:=NR_G0;
|
||||||
|
|
||||||
@ -241,7 +251,7 @@ interface
|
|||||||
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
exprasmlist.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,zeroreg));
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags := getresflags(true);
|
location.resflags:=getresflags(unsigned);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -249,7 +259,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 2003-07-06 17:44:12 peter
|
Revision 1.17 2003-07-06 22:09:50 peter
|
||||||
|
* signed compare fixed
|
||||||
|
|
||||||
|
Revision 1.16 2003/07/06 17:44:12 peter
|
||||||
* cleanup and first sparc implementation
|
* cleanup and first sparc implementation
|
||||||
|
|
||||||
Revision 1.15 2003/06/01 21:38:06 peter
|
Revision 1.15 2003/06/01 21:38:06 peter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user