Explorar el Código

+ introduced the AT_WASM_GLOBAL asm symbol type

Nikolay Nikolov hace 3 años
padre
commit
812732cb6a
Se han modificado 2 ficheros con 6 adiciones y 4 borrados
  1. 3 1
      compiler/aasmbase.pas
  2. 3 3
      compiler/wasm32/hlcgcpu.pas

+ 3 - 1
compiler/aasmbase.pas

@@ -70,7 +70,9 @@ interface
          { Thread-local symbol (ELF targets) }
          AT_TLS,
          { GNU indirect function (ELF targets) }
-         AT_GNU_IFUNC
+         AT_GNU_IFUNC,
+         { WebAssembly global variable }
+         AT_WASM_GLOBAL
          );
 
        { is the label only there for getting an DataOffset (e.g. for i/o

+ 3 - 3
compiler/wasm32/hlcgcpu.pas

@@ -1761,7 +1761,7 @@ implementation
 
       g_fingerprint(list);
 
-      list.Concat(taicpu.op_sym(a_global_get,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_LABEL)));
+      list.Concat(taicpu.op_sym(a_global_get,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_WASM_GLOBAL)));
       incstack(list,1);
       list.Concat(taicpu.op_ref(a_local_set,pd.base_pointer_ref));
       decstack(list,1);
@@ -1777,7 +1777,7 @@ implementation
         decstack(list,1);
         list.Concat(taicpu.op_ref(a_local_get,pd.frame_pointer_ref));
         incstack(list,1);
-        list.Concat(taicpu.op_sym(a_global_set,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_LABEL)));
+        list.Concat(taicpu.op_sym(a_global_set,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_WASM_GLOBAL)));
         decstack(list,1);
       end;
     end;
@@ -1789,7 +1789,7 @@ implementation
       pd:=tcpuprocdef(current_procinfo.procdef);
       list.Concat(taicpu.op_ref(a_local_get,pd.base_pointer_ref));
       incstack(list,1);
-      list.Concat(taicpu.op_sym(a_global_set,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_LABEL)));
+      list.Concat(taicpu.op_sym(a_global_set,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_WASM_GLOBAL)));
       decstack(list,1);
 
       list.concat(taicpu.op_none(a_return));