+ introduced the AT_WASM_GLOBAL asm symbol type

This commit is contained in:
Nikolay Nikolov 2021-09-27 02:52:29 +03:00
parent 8226233aa3
commit 812732cb6a
2 changed files with 6 additions and 4 deletions

View File

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

View File

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