mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-11 05:41:29 +01:00
* fixed currency division
This commit is contained in:
parent
1cf3aef0f0
commit
13618bb9cd
@ -61,7 +61,8 @@ implementation
|
|||||||
verbose,globals,systems,
|
verbose,globals,systems,
|
||||||
symconst,symdef,aasmbase,aasmtai,
|
symconst,symdef,aasmbase,aasmtai,
|
||||||
defutil,
|
defutil,
|
||||||
cgbase,pass_1,pass_2,
|
cgbase,cgutils,
|
||||||
|
pass_1,pass_2,
|
||||||
ncon,ncal,
|
ncon,ncal,
|
||||||
ncgutil,
|
ncgutil,
|
||||||
cpubase,aasmcpu,
|
cpubase,aasmcpu,
|
||||||
@ -77,8 +78,13 @@ implementation
|
|||||||
fname: string[19];
|
fname: string[19];
|
||||||
begin
|
begin
|
||||||
{ converting a 64bit integer to a float requires a helper }
|
{ converting a 64bit integer to a float requires a helper }
|
||||||
if is_64bitint(left.resulttype.def) then
|
if is_64bitint(left.resulttype.def) or
|
||||||
|
is_currency(left.resulttype.def) then
|
||||||
begin
|
begin
|
||||||
|
{ hack to avoid double division by 10000, as it's
|
||||||
|
already done by resulttypepass.resulttype_int_to_real }
|
||||||
|
if is_currency(left.resulttype.def) then
|
||||||
|
left.resulttype := s64inttype;
|
||||||
if is_signed(left.resulttype.def) then
|
if is_signed(left.resulttype.def) then
|
||||||
fname := 'fpc_int64_to_double'
|
fname := 'fpc_int64_to_double'
|
||||||
else
|
else
|
||||||
@ -220,7 +226,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.12 2004-10-31 21:45:03 peter
|
Revision 1.13 2004-11-01 12:10:26 florian
|
||||||
|
* fixed currency division
|
||||||
|
|
||||||
|
Revision 1.12 2004/10/31 21:45:03 peter
|
||||||
* generic tlocation
|
* generic tlocation
|
||||||
* move tlocation to cgutils
|
* move tlocation to cgutils
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user