+ write the end_function directive

git-svn-id: branches/wasm@46838 -
This commit is contained in:
nickysn 2020-09-11 14:47:27 +00:00
parent 4a5e2dbd23
commit fc96ad5afd
3 changed files with 9 additions and 2 deletions

View File

@ -407,7 +407,9 @@ interface
{ for the OMF object format }
asd_omf_linnum_line,
{ RISC-V }
asd_option
asd_option,
{ WebAssembly }
asd_end_function
);
TAsmSehDirective=(
@ -452,7 +454,9 @@ interface
{ for the OMF object format }
'omf_line',
{ RISC-V }
'option'
'option',
{ WebAssembly }
'end_function'
);
sehdirectivestr : array[TAsmSehDirective] of string[16]=(
'.seh_proc','.seh_endproc',

View File

@ -1806,6 +1806,8 @@ implementation
name has to be translated as well }
if dir=asd_cpu then
writer.AsmWrite(asminfo^.comment+' CPU ')
else if dir=asd_end_function then
writer.AsmWrite(#9#9+directivestr[dir])
else
writer.AsmWrite('.'+directivestr[dir]+' ');
end;

View File

@ -1707,6 +1707,7 @@ implementation
list.Concat(taicpu.op_sym(a_set_global,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_LABEL)));
list.concat(taicpu.op_none(a_return));
list.concat(tai_directive.Create(asd_end_function,''));
end;
procedure thlcgwasm.gen_load_return_value(list: TAsmList);