* don't create block..end_block around WebAssembly inline asm routines

This commit is contained in:
Nikolay Nikolov 2024-07-16 16:53:55 +03:00
parent 65d4319dc2
commit 7cbf18c6f3
2 changed files with 16 additions and 9 deletions

View File

@ -475,6 +475,7 @@ implementation
procedure tcpuprocinfo.generate_exit_label(list: tasmlist);
begin
if not (po_assembler in current_procinfo.procdef.procoptions) then
list.concat(taicpu.op_none(a_end_block));
inherited generate_exit_label(list);
end;

View File

@ -2343,11 +2343,16 @@ implementation
procedure thlcgwasm.gen_entry_code(list: TAsmList);
begin
inherited;
if not (po_assembler in current_procinfo.procdef.procoptions) then
begin
list.concat(taicpu.op_none(a_block));
list.concat(taicpu.op_none(a_block));
end;
end;
procedure thlcgwasm.gen_exit_code(list: TAsmList);
begin
if not (po_assembler in current_procinfo.procdef.procoptions) then
begin
list.concat(taicpu.op_none(a_end_block));
if ts_wasm_bf_exceptions in current_settings.targetswitches then
@ -2358,6 +2363,7 @@ implementation
{$else DEBUG_WASMSTACK}
internalerror(2021091801);
{$endif DEBUG_WASMSTACK}
end;
inherited;
end;