diff options
author | sergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-12-18 17:56:56 +0000 |
---|---|---|
committer | sergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-12-18 17:56:56 +0000 |
commit | c945650b5e2327778cb5f42e4a778429f1a6f526 (patch) | |
tree | 628cf93ea4f5a62dafc149e2c7a50066ea193a6c /compiler/ncon.pas | |
parent | 098dc07707c11311ff33719a447ee5f05765f806 (diff) | |
download | fpc-c945650b5e2327778cb5f42e4a778429f1a6f526.tar.gz |
* Proper fix for SPARC cycling with -dCHECK_PIC, pi_needs_got additionally must be set in following cases:
1) tguidconstnode.pass_1 (location is LOC_CREFERENCE)
2) tonnode.pass_1 (generic secondpass references VMT of exception class)
3) Conversion from unsigned to floating-point involves 'magic constant' as GOT-relative data object.
4) Case jumptable address is loaded relative to GOT.
(1) and (2) also provide more accurate setting of pi_needs_got for all targets.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23188 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncon.pas')
-rw-r--r-- | compiler/ncon.pas | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ncon.pas b/compiler/ncon.pas index 84df2d09b2..61c7bcf836 100644 --- a/compiler/ncon.pas +++ b/compiler/ncon.pas @@ -1313,6 +1313,9 @@ implementation begin result:=nil; expectloc:=LOC_CREFERENCE; + if (cs_create_pic in current_settings.moduleswitches) and + (tf_pic_uses_got in target_info.flags) then + include(current_procinfo.flags,pi_needs_got); end; function tguidconstnode.docompare(p: tnode): boolean; |