mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 13:29:27 +02:00
* introduce FPC_SUPPORT_X87_TYPES_ON_WIN64 define which allows to build
a win64 compiler support the x87 types extended and comp/currency handled by the FPU, this requires to use a i386 compiler as starting compiler and cross compilation because the starting compiler must support the 80 bit extended type git-svn-id: trunk@23023 -
This commit is contained in:
parent
45f60bc4b5
commit
a42b934c69
@ -2845,12 +2845,14 @@ begin
|
||||
def_system_macro('CPUX64');
|
||||
{ not supported for now, afaik (FK)
|
||||
def_system_macro('FPC_HAS_TYPE_FLOAT128'); }
|
||||
{ win64 doesn't support the legacy fpu }
|
||||
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
{ normally, win64 doesn't support the legacy fpu }
|
||||
if target_info.system=system_x86_64_win64 then
|
||||
begin
|
||||
def_system_macro('FPC_CURRENCY_IS_INT64');
|
||||
def_system_macro('FPC_COMP_IS_INT64');
|
||||
end;
|
||||
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
{$endif}
|
||||
{$ifdef sparc}
|
||||
def_system_macro('CPUSPARC');
|
||||
@ -3233,10 +3235,12 @@ if (target_info.abi = abi_eabihf) then
|
||||
def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
|
||||
{$endif}
|
||||
{$ifdef x86_64}
|
||||
{ win64 doesn't support the legacy fpu }
|
||||
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
{ normally, win64 doesn't support the legacy fpu }
|
||||
if target_info.system=system_x86_64_win64 then
|
||||
undef_system_macro('FPC_HAS_TYPE_EXTENDED')
|
||||
else
|
||||
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
def_system_macro('FPC_HAS_TYPE_EXTENDED');
|
||||
{$endif}
|
||||
end;
|
||||
|
@ -220,13 +220,15 @@ implementation
|
||||
tarraydef(openchararraytype).elementdef:=cansichartype;
|
||||
{$ifdef x86}
|
||||
create_fpu_types;
|
||||
if target_info.system<>system_x86_64_win64 then
|
||||
s64currencytype:=tfloatdef.create(s64currency)
|
||||
else
|
||||
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
if target_info.system=system_x86_64_win64 then
|
||||
begin
|
||||
s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
||||
pbestrealtype:=@s64floattype;
|
||||
end;
|
||||
end
|
||||
else
|
||||
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
s64currencytype:=tfloatdef.create(s64currency);
|
||||
{$endif x86}
|
||||
{$ifdef powerpc}
|
||||
create_fpu_types;
|
||||
@ -303,7 +305,9 @@ implementation
|
||||
addtype('CExtended',pbestrealtype^);
|
||||
end;
|
||||
{$ifdef x86}
|
||||
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
if target_info.system<>system_x86_64_win64 then
|
||||
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
addtype('Comp',tfloatdef.create(s64comp));
|
||||
{$endif x86}
|
||||
addtype('Currency',s64currencytype);
|
||||
@ -440,8 +444,10 @@ implementation
|
||||
var
|
||||
oldcurrentmodule : tmodule;
|
||||
begin
|
||||
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
if target_info.system=system_x86_64_win64 then
|
||||
pbestrealtype:=@s64floattype;
|
||||
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
||||
|
||||
oldcurrentmodule:=current_module;
|
||||
set_current_module(nil);
|
||||
|
Loading…
Reference in New Issue
Block a user