mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:49:20 +02:00
* SPARC: convert from int64/qword to float using genmath helpers. Removes dependency on softfloat code.
git-svn-id: trunk@26262 -
This commit is contained in:
parent
5ccdfcf106
commit
58cc531dd9
@ -78,7 +78,20 @@ implementation
|
|||||||
if is_64bitint(left.resultdef) or
|
if is_64bitint(left.resultdef) or
|
||||||
is_currency(left.resultdef) then
|
is_currency(left.resultdef) then
|
||||||
begin
|
begin
|
||||||
result:=inherited first_int_to_real;
|
{ hack to avoid double division by 10000, as it's
|
||||||
|
already done by typecheckpass.resultdef_int_to_real }
|
||||||
|
if is_currency(left.resultdef) then
|
||||||
|
left.resultdef := s64inttype;
|
||||||
|
if is_signed(left.resultdef) then
|
||||||
|
fname := 'fpc_int64_to_double'
|
||||||
|
else
|
||||||
|
fname := 'fpc_qword_to_double';
|
||||||
|
result := ccallnode.createintern(fname,ccallparanode.create(
|
||||||
|
left,nil));
|
||||||
|
left:=nil;
|
||||||
|
if (tfloatdef(resultdef).floattype=s32real) then
|
||||||
|
inserttypeconv(result,s32floattype);
|
||||||
|
firstpass(result);
|
||||||
exit;
|
exit;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user