mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 00:29:20 +02:00
* emit a tai_tagtype for __FPC_exception instead of hardcoding the asm output
directly when wasm native exceptions are enabled
This commit is contained in:
parent
10db5ea5dc
commit
a1c8e92904
@ -840,6 +840,8 @@ implementation
|
||||
writer.AsmWrite(gas_wasm_basic_type_str[wasm_basic_typ]);
|
||||
end;
|
||||
writer.AsmLn;
|
||||
writer.AsmWrite(hp.tagname);
|
||||
writer.AsmWriteLn(':');
|
||||
end;
|
||||
{$endif WASM}
|
||||
|
||||
|
@ -83,11 +83,6 @@ implementation
|
||||
procedure TLLVMMachineCodePlaygroundAssembler.WriteAsmList;
|
||||
begin
|
||||
writer.AsmWriteLn(#9'.globaltype'#9+STACK_POINTER_SYM+', i32');
|
||||
if ts_wasm_native_exceptions in current_settings.targetswitches then
|
||||
begin
|
||||
writer.AsmWriteLn(#9'.tagtype'#9'__FPC_exception');
|
||||
writer.AsmWriteLn('__FPC_exception:');
|
||||
end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
@ -40,7 +40,7 @@ interface
|
||||
implementation
|
||||
|
||||
uses
|
||||
globtype,
|
||||
globtype,globals,
|
||||
cpubase,
|
||||
aasmdata,aasmcpu,
|
||||
hlcgobj,hlcgcpu,
|
||||
@ -68,6 +68,10 @@ implementation
|
||||
inherited;
|
||||
|
||||
list:=current_asmdata.asmlists[al_start];
|
||||
|
||||
if ts_wasm_native_exceptions in current_settings.targetswitches then
|
||||
list.Concat(tai_tagtype.create('__FPC_exception', []));
|
||||
|
||||
for i:=0 to current_module.deflist.Count-1 do
|
||||
begin
|
||||
def:=tdef(current_module.deflist[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user