* 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:
florian 2008-01-13 09:59:13 +00:00
parent 2d91fef4f1
commit 295fdbe37c
2 changed files with 12 additions and 2 deletions

View File

@ -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;

View File

@ -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,