mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 15:49:26 +02:00
* activate code to remove unnecessary widenings to 64 bit in case
cpu64bitaddr is not defined rather than if cpu64bitalu is not defined, because whether or not operations should be 64 bit by default depends on cpu64bitaddr, and even if a cpu can perform 64 bit alu operations, 32 bit ones are likely faster git-svn-id: branches/jvmbackend@18748 -
This commit is contained in:
parent
d48fa1d7e2
commit
851cb65021
@ -2275,8 +2275,11 @@ implementation
|
||||
result:=typecheck_call_helper(convtype);
|
||||
end;
|
||||
|
||||
|
||||
{$ifndef cpu64bitalu}
|
||||
{ this is done in case of no cpu64bitaddr define rather than cpu64bitalu,
|
||||
because whether or not expressions are evaluated as 64 bit by default depends
|
||||
on cpu64bitaddr. Even on a cpu with a 64 bit alu, a 32 bit operations are
|
||||
likely to be faster than 64 bit ones. }
|
||||
{$ifndef cpu64bitaddr}
|
||||
|
||||
{ checks whether we can safely remove 64 bit typeconversions }
|
||||
{ in case range and overflow checking are off, and in case }
|
||||
@ -2392,15 +2395,15 @@ implementation
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{$endif not cpu64bitalu}
|
||||
{$endif not cpu64bitaddr}
|
||||
|
||||
|
||||
function ttypeconvnode.simplify(forinline : boolean): tnode;
|
||||
var
|
||||
hp: tnode;
|
||||
{$ifndef cpu64bitalu}
|
||||
{$ifndef cpu64bitaddr}
|
||||
foundsint: boolean;
|
||||
{$endif not cpu64bitalu}
|
||||
{$endif not cpu64bitaddr}
|
||||
begin
|
||||
result := nil;
|
||||
{ Constant folding and other node transitions to
|
||||
@ -2564,7 +2567,7 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifndef cpu64bitalu}
|
||||
{$ifndef cpu64bitaddr}
|
||||
{ must be done before code below, because we need the
|
||||
typeconversions for ordconstn's as well }
|
||||
case convtype of
|
||||
@ -2583,7 +2586,7 @@ implementation
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{$endif not cpu64bitalu}
|
||||
{$endif not cpu64bitaddr}
|
||||
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user