Просмотр исходного кода

LoongArch: Always emit la.got for global symbol

Jinyang He 11 месяцев назад
Родитель
Сommit
d1c3ba96f2
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      compiler/loongarch64/cgcpu.pas

+ 1 - 4
compiler/loongarch64/cgcpu.pas

@@ -1517,10 +1517,7 @@ implementation
         if assigned(ref.symbol) then
           begin
             tmpreg:=getintregister(list,OS_INT);
-            if ((cs_create_pic in current_settings.moduleswitches) and
-                (ref.symbol.bind in [AB_LOCAL,AB_TEMP])) or
-               ((not(cs_create_pic in current_settings.moduleswitches)) and
-                (ref.symbol.bind in [AB_LOCAL,AB_GLOBAL,AB_TEMP])) then
+            if (ref.symbol.bind in [AB_LOCAL,AB_TEMP]) then
               begin
                 { Load symbol address as local. }
                 reference_reset_symbol(href,ref.symbol,ref.offset,ref.alignment,ref.volatility);