mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:46:12 +02:00
* <signed type> to qword range check for 64 bit targets fixed
This commit is contained in:
parent
4e8795893e
commit
143b4a8cb1
@ -1736,7 +1736,17 @@ implementation
|
|||||||
a_load_loc_reg(list,OS_INT,l,hreg);
|
a_load_loc_reg(list,OS_INT,l,hreg);
|
||||||
a_op_const_reg(list,OP_SUB,OS_INT,aint(lto),hreg);
|
a_op_const_reg(list,OP_SUB,OS_INT,aint(lto),hreg);
|
||||||
objectlibrary.getlabel(neglabel);
|
objectlibrary.getlabel(neglabel);
|
||||||
a_cmp_const_reg_label(list,OS_INT,OC_BE,aint(hto-lto),hreg,neglabel);
|
{
|
||||||
|
if from_signed then
|
||||||
|
a_cmp_const_reg_label(list,OS_INT,OC_GTE,aint(hto-lto),hreg,neglabel)
|
||||||
|
else
|
||||||
|
}
|
||||||
|
{$ifdef cpu64bit}
|
||||||
|
if qword(hto-lto)>qword(aintmax) then
|
||||||
|
a_cmp_const_reg_label(list,OS_INT,OC_BE,aintmax,hreg,neglabel)
|
||||||
|
else
|
||||||
|
{$endif cpu64bit}
|
||||||
|
a_cmp_const_reg_label(list,OS_INT,OC_BE,aint(hto-lto),hreg,neglabel);
|
||||||
a_call_name(list,'FPC_RANGEERROR');
|
a_call_name(list,'FPC_RANGEERROR');
|
||||||
a_label(list,neglabel);
|
a_label(list,neglabel);
|
||||||
end;
|
end;
|
||||||
@ -2029,7 +2039,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.183 2004-10-31 21:45:02 peter
|
Revision 1.184 2004-11-02 17:25:36 florian
|
||||||
|
* <signed type> to qword range check for 64 bit targets fixed
|
||||||
|
|
||||||
|
Revision 1.183 2004/10/31 21:45:02 peter
|
||||||
* generic tlocation
|
* generic tlocation
|
||||||
* move tlocation to cgutils
|
* move tlocation to cgutils
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user