+ first attempt at writing the .local WASM directive

git-svn-id: branches/wasm@46709 -
This commit is contained in:
nickysn 2020-08-26 21:07:11 +00:00
parent 35a4e705db
commit f95d35340c
2 changed files with 13 additions and 1 deletions

View File

@ -118,6 +118,9 @@ implementation
{$ifdef m68k}
cpuinfo,aasmcpu,
{$endif m68k}
{$ifdef wasm}
aasmcpu,
{$endif wasm}
cpubase,objcasm;
const
@ -1552,7 +1555,14 @@ implementation
{$ifdef WASM}
ait_local:
begin
writer.AsmWriteLn(asminfo^.comment+'TODO: ait_local');
writer.AsmWrite(#9'.local'#9);
writer.AsmWrite(gas_wasm_basic_type_str[tai_local(hp).bastyp]);
if tai_local(hp).name<>'' then
begin
writer.AsmWrite(#9+asminfo^.comment);
writer.AsmWrite(tai_local(hp).name);
end;
writer.AsmLn;
end;
ait_importexport:
begin

View File

@ -84,6 +84,8 @@ interface
'grow_memory', 'current_memory'
);
gas_wasm_basic_type_str : array [TWasmBasicType] of string = ('i32','i64','f32','f64');
function gas_regname(r:Tregister):string;