mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-25 15:09:56 +02:00
* WebAssembly threads internal linker: starting working on TWasmExeOutput.SetThreadVarGlobalsInitValues
This commit is contained in:
parent
39ab212642
commit
334ef633a8
@ -279,6 +279,7 @@ interface
|
|||||||
procedure PrepareTags;
|
procedure PrepareTags;
|
||||||
function AddOrGetIndirectFunctionTableIndex(FuncIdx: Integer): integer;
|
function AddOrGetIndirectFunctionTableIndex(FuncIdx: Integer): integer;
|
||||||
procedure SetStackPointer;
|
procedure SetStackPointer;
|
||||||
|
procedure SetThreadVarGlobalsInitValues;
|
||||||
procedure GenerateCode_InitTls;
|
procedure GenerateCode_InitTls;
|
||||||
procedure WriteExeSectionToDynArray(exesec: TExeSection; dynarr: tdynamicarray);
|
procedure WriteExeSectionToDynArray(exesec: TExeSection; dynarr: tdynamicarray);
|
||||||
protected
|
protected
|
||||||
@ -4878,6 +4879,7 @@ implementation
|
|||||||
WriteName(FWasmCustomSections[cust_sec],WasmCustomSectionName[cust_sec]);
|
WriteName(FWasmCustomSections[cust_sec],WasmCustomSectionName[cust_sec]);
|
||||||
|
|
||||||
SetStackPointer;
|
SetStackPointer;
|
||||||
|
SetThreadVarGlobalsInitValues;
|
||||||
GenerateCode_InitTls;
|
GenerateCode_InitTls;
|
||||||
|
|
||||||
FFuncTypes.WriteTo(FWasmSections[wsiType]);
|
FFuncTypes.WriteTo(FWasmSections[wsiType]);
|
||||||
@ -5425,6 +5427,24 @@ implementation
|
|||||||
FStackPointerSym.LinkingData.GlobalInitializer.init_i32:=Int32(InitialStackPtrAddr);
|
FStackPointerSym.LinkingData.GlobalInitializer.init_i32:=Int32(InitialStackPtrAddr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWasmExeOutput.SetThreadVarGlobalsInitValues;
|
||||||
|
var
|
||||||
|
exesec: TExeSection;
|
||||||
|
i: Integer;
|
||||||
|
objsec: TWasmObjSection;
|
||||||
|
objsym: TWasmObjSymbol;
|
||||||
|
begin
|
||||||
|
exesec:=FindExeSection('.wasm_globals');
|
||||||
|
if not assigned(exesec) then
|
||||||
|
internalerror(2024010112);
|
||||||
|
for i:=0 to exesec.ObjSectionList.Count-1 do
|
||||||
|
begin
|
||||||
|
objsec:=TWasmObjSection(exesec.ObjSectionList[i]);
|
||||||
|
objsym:=objsec.MainFuncSymbol;
|
||||||
|
{ TODO: implement }
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TWasmExeOutput.GenerateCode_InitTls;
|
procedure TWasmExeOutput.GenerateCode_InitTls;
|
||||||
var
|
var
|
||||||
a: Byte=0;
|
a: Byte=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user