mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 20:49:14 +02:00
* some fixes for expectloc
This commit is contained in:
parent
a0c0a8fa8c
commit
01d6358f93
@ -1170,6 +1170,10 @@ unit nx86add;
|
|||||||
make_not_regable(right,[ra_addr_regable]);
|
make_not_regable(right,[ra_addr_regable]);
|
||||||
end;
|
end;
|
||||||
Result:=inherited pass_1;
|
Result:=inherited pass_1;
|
||||||
|
{ correct expectloc, it does not matter of Result is set as another pass_1 is run on it
|
||||||
|
which will fix that one }
|
||||||
|
if use_vectorfpu(resultdef) then
|
||||||
|
expectloc:=LOC_MMREGISTER;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,12 +53,14 @@ implementation
|
|||||||
result:=nil;
|
result:=nil;
|
||||||
if is_number_float(value_real) and not(use_vectorfpu(resultdef)) and ((value_real=1.0) or ((value_real=0.0) and (get_real_sign(value_real)=1))) then
|
if is_number_float(value_real) and not(use_vectorfpu(resultdef)) and ((value_real=1.0) or ((value_real=0.0) and (get_real_sign(value_real)=1))) then
|
||||||
expectloc:=LOC_FPUREGISTER
|
expectloc:=LOC_FPUREGISTER
|
||||||
|
else if (value_real=0.0) and (get_real_sign(value_real)=1) and use_vectorfpu(resultdef) then
|
||||||
|
expectloc:=LOC_MMREGISTER
|
||||||
else
|
else
|
||||||
expectloc:=LOC_CREFERENCE;
|
expectloc:=LOC_CREFERENCE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tx86realconstnode.pass_generate_code;
|
|
||||||
|
|
||||||
|
procedure tx86realconstnode.pass_generate_code;
|
||||||
begin
|
begin
|
||||||
if is_number_float(value_real) then
|
if is_number_float(value_real) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user