+ allow jumps to goto targets

This commit is contained in:
Nikolay Nikolov 2023-10-22 00:35:05 +03:00
parent 5e9cf637d3
commit b1cec6de2a
3 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,9 @@ interface
is_set : boolean;
is_public : boolean;
defined_in_asmstatement : boolean;
{$ifdef wasm32}
is_pascal_goto_target: boolean;
{$endif wasm32}
constructor Createlocal(AList: TFPHashObjectList; nr: longint; ltyp: TAsmLabelType);
constructor Createstatic(AList: TFPHashObjectList; nr: longint; ltyp: TAsmLabelType);
constructor Createglobal(AList: TFPHashObjectList; const modulename: TSymStr; nr: longint; ltyp: TAsmLabelType);

View File

@ -147,6 +147,7 @@ implementation
lbl: tai_label;
begin
lbl:=tai_label.create(l);
l.is_pascal_goto_target:=true;
lbl.is_pascal_goto_target:=true;
list.concat(lbl);
end;

View File

@ -1925,6 +1925,8 @@ implementation
list.concat(taicpu.op_sym(a_br,l))
else if l=current_procinfo.CurrExitLabel then
list.concat(taicpu.op_sym(a_br,l))
else if l.is_pascal_goto_target then
list.concat(taicpu.op_sym(a_br,l))
else
begin
{$ifndef EXTDEBUG}