mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:29:14 +02:00
* declare end_function as an instruction, instead of a directive
git-svn-id: branches/wasm@46849 -
This commit is contained in:
parent
5c27030faf
commit
5ee6e9d593
@ -407,9 +407,7 @@ interface
|
|||||||
{ for the OMF object format }
|
{ for the OMF object format }
|
||||||
asd_omf_linnum_line,
|
asd_omf_linnum_line,
|
||||||
{ RISC-V }
|
{ RISC-V }
|
||||||
asd_option,
|
asd_option
|
||||||
{ WebAssembly }
|
|
||||||
asd_end_function
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TAsmSehDirective=(
|
TAsmSehDirective=(
|
||||||
@ -454,9 +452,7 @@ interface
|
|||||||
{ for the OMF object format }
|
{ for the OMF object format }
|
||||||
'omf_line',
|
'omf_line',
|
||||||
{ RISC-V }
|
{ RISC-V }
|
||||||
'option',
|
'option'
|
||||||
{ WebAssembly }
|
|
||||||
'end_function'
|
|
||||||
);
|
);
|
||||||
sehdirectivestr : array[TAsmSehDirective] of string[16]=(
|
sehdirectivestr : array[TAsmSehDirective] of string[16]=(
|
||||||
'.seh_proc','.seh_endproc',
|
'.seh_proc','.seh_endproc',
|
||||||
|
@ -1811,8 +1811,6 @@ implementation
|
|||||||
name has to be translated as well }
|
name has to be translated as well }
|
||||||
if dir=asd_cpu then
|
if dir=asd_cpu then
|
||||||
writer.AsmWrite(asminfo^.comment+' CPU ')
|
writer.AsmWrite(asminfo^.comment+' CPU ')
|
||||||
else if dir=asd_end_function then
|
|
||||||
writer.AsmWrite(#9#9+directivestr[dir])
|
|
||||||
else
|
else
|
||||||
writer.AsmWrite('.'+directivestr[dir]+' ');
|
writer.AsmWrite('.'+directivestr[dir]+' ');
|
||||||
end;
|
end;
|
||||||
|
@ -40,7 +40,7 @@ uses
|
|||||||
TAsmOp=(A_None,
|
TAsmOp=(A_None,
|
||||||
// control flow
|
// control flow
|
||||||
a_block, a_loop, a_br, a_br_if, a_br_table, a_if, a_else, a_end_block,
|
a_block, a_loop, a_br, a_br_if, a_br_table, a_if, a_else, a_end_block,
|
||||||
a_end_loop, a_end_if, a_return, a_unreachable,
|
a_end_loop, a_end_if, a_end_function, a_return, a_unreachable,
|
||||||
// basic
|
// basic
|
||||||
a_nop, a_drop, a_i32_const, a_i64_const, a_f32_const, a_f64_const,
|
a_nop, a_drop, a_i32_const, a_i64_const, a_f32_const, a_f64_const,
|
||||||
a_get_local, a_set_local, a_tee_local, a_get_global, a_set_global,
|
a_get_local, a_set_local, a_tee_local, a_get_global, a_set_global,
|
||||||
|
@ -1707,7 +1707,7 @@ implementation
|
|||||||
list.Concat(taicpu.op_sym(a_set_global,current_asmdata.RefAsmSymbol(STACK_POINTER_SYM,AT_LABEL)));
|
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(taicpu.op_none(a_return));
|
||||||
list.concat(tai_directive.Create(asd_end_function,''));
|
list.concat(taicpu.op_none(a_end_function));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgwasm.gen_load_return_value(list: TAsmList);
|
procedure thlcgwasm.gen_load_return_value(list: TAsmList);
|
||||||
|
@ -39,7 +39,7 @@ interface
|
|||||||
'<none>',
|
'<none>',
|
||||||
// control flow
|
// control flow
|
||||||
'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end_block',
|
'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end_block',
|
||||||
'end_loop', 'end_if', 'return', 'unreachable',
|
'end_loop', 'end_if', 'end_function', 'return', 'unreachable',
|
||||||
// basic
|
// basic
|
||||||
'nop', 'drop', 'i32.const', 'i64.const', 'f32.const', 'f64.const',
|
'nop', 'drop', 'i32.const', 'i64.const', 'f32.const', 'f64.const',
|
||||||
'local.get', 'local.set', 'local.tee', 'global.get', 'global.set',
|
'local.get', 'local.set', 'local.tee', 'global.get', 'global.set',
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
'<none>',
|
'<none>',
|
||||||
// control flow
|
// control flow
|
||||||
'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end', 'end', 'end',
|
'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end', 'end', 'end', '',
|
||||||
'return', 'unreachable',
|
'return', 'unreachable',
|
||||||
// basic
|
// basic
|
||||||
'nop', 'drop', 'i32.const', 'i64.const', 'f32.const', 'f64.const',
|
'nop', 'drop', 'i32.const', 'i64.const', 'f32.const', 'f64.const',
|
||||||
|
Loading…
Reference in New Issue
Block a user