mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:49:20 +02:00
* don't create block..end_block around WebAssembly inline asm routines
This commit is contained in:
parent
65d4319dc2
commit
7cbf18c6f3
@ -475,7 +475,8 @@ implementation
|
|||||||
|
|
||||||
procedure tcpuprocinfo.generate_exit_label(list: tasmlist);
|
procedure tcpuprocinfo.generate_exit_label(list: tasmlist);
|
||||||
begin
|
begin
|
||||||
list.concat(taicpu.op_none(a_end_block));
|
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
|
list.concat(taicpu.op_none(a_end_block));
|
||||||
inherited generate_exit_label(list);
|
inherited generate_exit_label(list);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2343,21 +2343,27 @@ implementation
|
|||||||
procedure thlcgwasm.gen_entry_code(list: TAsmList);
|
procedure thlcgwasm.gen_entry_code(list: TAsmList);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
list.concat(taicpu.op_none(a_block));
|
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
list.concat(taicpu.op_none(a_block));
|
begin
|
||||||
|
list.concat(taicpu.op_none(a_block));
|
||||||
|
list.concat(taicpu.op_none(a_block));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgwasm.gen_exit_code(list: TAsmList);
|
procedure thlcgwasm.gen_exit_code(list: TAsmList);
|
||||||
begin
|
begin
|
||||||
list.concat(taicpu.op_none(a_end_block));
|
if not (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
if ts_wasm_bf_exceptions in current_settings.targetswitches then
|
begin
|
||||||
a_label(list,tcpuprocinfo(current_procinfo).CurrRaiseLabel);
|
list.concat(taicpu.op_none(a_end_block));
|
||||||
if fevalstackheight<>0 then
|
if ts_wasm_bf_exceptions in current_settings.targetswitches then
|
||||||
|
a_label(list,tcpuprocinfo(current_procinfo).CurrRaiseLabel);
|
||||||
|
if fevalstackheight<>0 then
|
||||||
{$ifdef DEBUG_WASMSTACK}
|
{$ifdef DEBUG_WASMSTACK}
|
||||||
list.concat(tai_comment.Create(strpnew('!!! values remaining on stack at end of block !!!')));
|
list.concat(tai_comment.Create(strpnew('!!! values remaining on stack at end of block !!!')));
|
||||||
{$else DEBUG_WASMSTACK}
|
{$else DEBUG_WASMSTACK}
|
||||||
internalerror(2021091801);
|
internalerror(2021091801);
|
||||||
{$endif DEBUG_WASMSTACK}
|
{$endif DEBUG_WASMSTACK}
|
||||||
|
end;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user