mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:39:25 +02:00
* MIPS: pi_needs_got is necessary when doing unsigned to float conversions (it uses a global constant) and also if procedure does any calls in PIC mode.
git-svn-id: trunk@24822 -
This commit is contained in:
parent
5fe8b516d4
commit
86637a9ff9
@ -129,10 +129,14 @@ implementation
|
||||
|
||||
procedure TMIPSProcInfo.allocate_got_register(list:tasmlist);
|
||||
begin
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
(pi_needs_got in flags) and
|
||||
not (po_nostackframe in procdef.procoptions) then
|
||||
tg.gettemp(list,sizeof(aint),sizeof(aint),tt_noreuse,save_gp_ref);
|
||||
if (cs_create_pic in current_settings.moduleswitches) then
|
||||
begin
|
||||
if (pi_do_call in flags) then
|
||||
include(flags,pi_needs_got);
|
||||
if (pi_needs_got in flags) and
|
||||
not (po_nostackframe in procdef.procoptions) then
|
||||
tg.gettemp(list,sizeof(aint),sizeof(aint),tt_noreuse,save_gp_ref);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -71,8 +71,6 @@ uses
|
||||
*****************************************************************************}
|
||||
|
||||
function tmipseltypeconvnode.first_int_to_real: tnode;
|
||||
var
|
||||
fname: string[19];
|
||||
begin
|
||||
{ converting a 64bit integer to a float requires a helper }
|
||||
if is_64bitint(left.resultdef) or
|
||||
@ -87,7 +85,11 @@ begin
|
||||
if is_signed(left.resultdef) then
|
||||
inserttypeconv(left,s32inttype)
|
||||
else
|
||||
inserttypeconv(left,u32inttype);
|
||||
begin
|
||||
inserttypeconv(left,u32inttype);
|
||||
if (cs_create_pic in current_settings.moduleswitches) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
end;
|
||||
firstpass(left);
|
||||
end;
|
||||
result := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user