Quellcode durchsuchen

* improve module local data accesses by avoiding a got read

florian vor 2 Jahren
Ursprung
Commit
4430422489
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      compiler/aarch64/cgcpu.pas

+ 2 - 2
compiler/aarch64/cgcpu.pas

@@ -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