mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 20:49:16 +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]);
|
writer.AsmWrite(gas_wasm_basic_type_str[wasm_basic_typ]);
|
||||||
end;
|
end;
|
||||||
writer.AsmLn;
|
writer.AsmLn;
|
||||||
|
writer.AsmWrite(hp.tagname);
|
||||||
|
writer.AsmWriteLn(':');
|
||||||
end;
|
end;
|
||||||
{$endif WASM}
|
{$endif WASM}
|
||||||
|
|
||||||
|
@ -83,11 +83,6 @@ implementation
|
|||||||
procedure TLLVMMachineCodePlaygroundAssembler.WriteAsmList;
|
procedure TLLVMMachineCodePlaygroundAssembler.WriteAsmList;
|
||||||
begin
|
begin
|
||||||
writer.AsmWriteLn(#9'.globaltype'#9+STACK_POINTER_SYM+', i32');
|
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;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,
|
globtype,globals,
|
||||||
cpubase,
|
cpubase,
|
||||||
aasmdata,aasmcpu,
|
aasmdata,aasmcpu,
|
||||||
hlcgobj,hlcgcpu,
|
hlcgobj,hlcgcpu,
|
||||||
@ -68,6 +68,10 @@ implementation
|
|||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
list:=current_asmdata.asmlists[al_start];
|
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
|
for i:=0 to current_module.deflist.Count-1 do
|
||||||
begin
|
begin
|
||||||
def:=tdef(current_module.deflist[i]);
|
def:=tdef(current_module.deflist[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user