mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 03:38:37 +02:00
+ introduced [hl]cg.a_label_pascal_goto_target. It is similar to [hl]cg.a_label
and is called by the code generator, when the label generated is the result of a Pascal label.
This commit is contained in:
parent
d24eeffa2b
commit
9b8af14f47
@ -124,6 +124,8 @@ unit cgobj;
|
||||
|
||||
{# Emit a label to the instruction stream. }
|
||||
procedure a_label(list : TAsmList;l : tasmlabel);virtual;
|
||||
{# Emit a label that can be a target of a Pascal goto statement to the instruction stream. }
|
||||
procedure a_label_pascal_goto_target(list : TAsmList;l : tasmlabel);virtual;
|
||||
|
||||
{# Allocates register r by inserting a pai_realloc record }
|
||||
procedure a_reg_alloc(list : TAsmList;r : tregister);
|
||||
@ -953,6 +955,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure tcg.a_label_pascal_goto_target(list : TAsmList;l : tasmlabel);
|
||||
begin
|
||||
a_label(list,l);
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
for better code generation these methods should be overridden
|
||||
******************************************************************************}
|
||||
|
@ -126,6 +126,8 @@ unit hlcgobj;
|
||||
|
||||
{# Emit a label to the instruction stream. }
|
||||
procedure a_label(list : TAsmList;l : tasmlabel); inline;
|
||||
{# Emit a label that can be a target of a Pascal goto statement to the instruction stream. }
|
||||
procedure a_label_pascal_goto_target(list : TAsmList;l : tasmlabel); inline;
|
||||
|
||||
{# Allocates register r by inserting a pai_realloc record }
|
||||
procedure a_reg_alloc(list : TAsmList;r : tregister); inline;
|
||||
@ -901,6 +903,11 @@ implementation
|
||||
cg.a_label(list,l);
|
||||
end;
|
||||
|
||||
procedure thlcgobj.a_label_pascal_goto_target(list : TAsmList;l : tasmlabel); inline;
|
||||
begin
|
||||
cg.a_label_pascal_goto_target(list,l);
|
||||
end;
|
||||
|
||||
procedure thlcgobj.a_reg_alloc(list: TAsmList; r: tregister);
|
||||
begin
|
||||
cg.a_reg_alloc(list,r);
|
||||
|
@ -502,7 +502,7 @@ implementation
|
||||
location_reset(location,LOC_VOID,OS_NO);
|
||||
if not (nf_internal in flags) then
|
||||
include(flowcontrol,fc_gotolabel);
|
||||
hlcg.a_label(current_asmdata.CurrAsmList,getasmlabel);
|
||||
hlcg.a_label_pascal_goto_target(current_asmdata.CurrAsmList,getasmlabel);
|
||||
|
||||
{ Write also extra label if this label was referenced from
|
||||
assembler block }
|
||||
|
Loading…
Reference in New Issue
Block a user