mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-02 12:27:40 +02:00
* genintconstnode now returns cardinals instead of int64 constants if possible
This commit is contained in:
parent
200e1d4b25
commit
d3a8cc7fc8
@ -146,13 +146,17 @@ implementation
|
|||||||
function genintconstnode(v : TConstExprInt) : tordconstnode;
|
function genintconstnode(v : TConstExprInt) : tordconstnode;
|
||||||
|
|
||||||
var
|
var
|
||||||
i : TConstExprInt;
|
i,i2 : TConstExprInt;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{ we need to bootstrap this code, so it's a little bit messy }
|
{ we need to bootstrap this code, so it's a little bit messy }
|
||||||
i:=2147483647;
|
i:=2147483647;
|
||||||
|
{ maxcardinal }
|
||||||
|
i2 := i+i+1;
|
||||||
if (v<=i) and (v>=-i-1) then
|
if (v<=i) and (v>=-i-1) then
|
||||||
genintconstnode:=genordinalconstnode(v,s32bitdef)
|
genintconstnode:=genordinalconstnode(v,s32bitdef)
|
||||||
|
else if (v > i) and (v <= i2) then
|
||||||
|
genintconstnode:=genordinalconstnode(v,u32bitdef)
|
||||||
else
|
else
|
||||||
genintconstnode:=genordinalconstnode(v,cs64bitdef);
|
genintconstnode:=genordinalconstnode(v,cs64bitdef);
|
||||||
end;
|
end;
|
||||||
@ -658,7 +662,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2000-12-15 13:26:01 jonas
|
Revision 1.14 2000-12-16 15:58:48 jonas
|
||||||
|
* genintconstnode now returns cardinals instead of int64 constants if possible
|
||||||
|
|
||||||
|
Revision 1.13 2000/12/15 13:26:01 jonas
|
||||||
* only return int64's from functions if it int64funcresok is defined
|
* only return int64's from functions if it int64funcresok is defined
|
||||||
+ added int64funcresok define to options.pas
|
+ added int64funcresok define to options.pas
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user