mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 08:29:32 +01:00
* use the current cgsizes instead of the def to determine if loadfpu can be used, else softfloats are broken
git-svn-id: trunk@9728 -
This commit is contained in:
parent
2d91fef4f1
commit
295fdbe37c
@ -321,6 +321,9 @@ interface
|
||||
function int_cgsize(const a: aint): tcgsize;{$ifdef USEINLINE}inline;{$endif}
|
||||
function int_float_cgsize(const a: aint): tcgsize;
|
||||
|
||||
{ returns true if s is a size handled by the fpu }
|
||||
function isfloatsize(s : tcgsize) : boolean;{$ifdef USEINLINE}inline;{$endif}
|
||||
|
||||
{ return the inverse condition of opcmp }
|
||||
function inverse_opcmp(opcmp: topcmp): topcmp;{$ifdef USEINLINE}inline;{$endif}
|
||||
|
||||
@ -672,6 +675,13 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{ returns true if s is a size handled by the fpu }
|
||||
function isfloatsize(s : tcgsize) : boolean;{$ifdef USEINLINE}inline;{$endif}
|
||||
begin
|
||||
result:=s in [OS_F32,OS_F64,OS_F80,OS_C64,OS_F128]
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
new(mms_movescalar);
|
||||
mms_movescalar^.len:=0;
|
||||
|
||||
@ -692,8 +692,8 @@ implementation
|
||||
LOC_REFERENCE,
|
||||
LOC_CREFERENCE :
|
||||
begin
|
||||
if (left.resultdef.typ=floatdef) and
|
||||
(right.resultdef.typ=floatdef) and
|
||||
if isfloatsize(left.location.size) and
|
||||
isfloatsize(right.location.size) and
|
||||
(left.location.size<>right.location.size) then
|
||||
begin
|
||||
cg.a_loadfpu_ref_ref(current_asmdata.CurrAsmList,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user