* fixed wrong class cast in case arrays/records are passed to a_loadfpu*()

(fixes tests/webtbs/tw26993.pp for llvm)

git-svn-id: trunk@34280 -
This commit is contained in:
Jonas Maebe 2016-08-12 13:35:31 +00:00
parent 4e8bda76cb
commit f4015f6ac9

View File

@ -1157,8 +1157,12 @@ implementation
(since that's their storage size and internally they also are int64).
Solve this by changing the type to s80real once they are loaded into
a register. }
fromcompcurr:=tfloatdef(fromsize).floattype in [s64comp,s64currency];
tocompcurr:=tfloatdef(tosize).floattype in [s64comp,s64currency];
fromcompcurr:=
(fromsize.typ=floatdef) and
(tfloatdef(fromsize).floattype in [s64comp,s64currency]);
tocompcurr:=
(tosize.typ=floatdef) and
(tfloatdef(tosize).floattype in [s64comp,s64currency]);
if tocompcurr then
tosize:=s80floattype;
{ don't generate different code for loading e.g. extended into cextended,
@ -1194,8 +1198,12 @@ implementation
tocompcurr: boolean;
begin
{ see comment in a_loadfpu_ref_reg }
fromcompcurr:=tfloatdef(fromsize).floattype in [s64comp,s64currency];
tocompcurr:=tfloatdef(tosize).floattype in [s64comp,s64currency];
fromcompcurr:=
(fromsize.typ=floatdef) and
(tfloatdef(fromsize).floattype in [s64comp,s64currency]);
tocompcurr:=
(tosize.typ=floatdef) and
(tfloatdef(tosize).floattype in [s64comp,s64currency]);
if fromcompcurr then
fromsize:=s80floattype;
href:=make_simple_ref(list,ref,tosize);