mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* improve module local data accesses by avoiding a got read
This commit is contained in:
parent
9e48addff5
commit
4430422489
@ -184,7 +184,7 @@ implementation
|
||||
preferred_newbasereg:=getaddressregister(list);
|
||||
{ load the (GOT) page }
|
||||
reference_reset_symbol(href,ref.symbol,0,8,[]);
|
||||
if ((ref.symbol.typ in [AT_FUNCTION,AT_LABEL]) and
|
||||
if ((ref.symbol.typ in [AT_FUNCTION,AT_LABEL,AT_DATA]) and
|
||||
(ref.symbol.bind in [AB_LOCAL,AB_GLOBAL])) or
|
||||
((ref.symbol.typ=AT_DATA) and
|
||||
(ref.symbol.bind=AB_LOCAL)) or
|
||||
@ -198,7 +198,7 @@ implementation
|
||||
href.symbol:=ref.symbol;
|
||||
{ code symbols defined in the current compilation unit do not
|
||||
have to be accessed via the GOT }
|
||||
if ((ref.symbol.typ in [AT_FUNCTION,AT_LABEL]) and
|
||||
if ((ref.symbol.typ in [AT_FUNCTION,AT_LABEL,AT_DATA]) and
|
||||
(ref.symbol.bind in [AB_LOCAL,AB_GLOBAL])) or
|
||||
((ref.symbol.typ=AT_DATA) and
|
||||
(ref.symbol.bind=AB_LOCAL)) or
|
||||
|
Loading…
Reference in New Issue
Block a user