summaryrefslogtreecommitdiff
path: root/compiler/mips/ncpucnv.pas
diff options
context:
space:
mode:
authorsergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-06-08 23:29:50 +0000
committersergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-06-08 23:29:50 +0000
commit82fc37949584f843cf49f93a31695b790ae2a000 (patch)
tree49edab62aa1b525d7711214e2e3a803bd3cd09df /compiler/mips/ncpucnv.pas
parent54324d9453ef0c969db6a0ec7b6e7bfa1e6196f1 (diff)
downloadfpc-82fc37949584f843cf49f93a31695b790ae2a000.tar.gz
* 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: http://svn.freepascal.org/svn/fpc/trunk@24822 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/mips/ncpucnv.pas')
-rw-r--r--compiler/mips/ncpucnv.pas8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/mips/ncpucnv.pas b/compiler/mips/ncpucnv.pas
index 3f9952fe4a..98dfba9688 100644
--- a/compiler/mips/ncpucnv.pas
+++ b/compiler/mips/ncpucnv.pas
@@ -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;