mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
+ first attempt at writing the .local WASM directive
git-svn-id: branches/wasm@46709 -
This commit is contained in:
parent
35a4e705db
commit
f95d35340c
@ -118,6 +118,9 @@ implementation
|
|||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
cpuinfo,aasmcpu,
|
cpuinfo,aasmcpu,
|
||||||
{$endif m68k}
|
{$endif m68k}
|
||||||
|
{$ifdef wasm}
|
||||||
|
aasmcpu,
|
||||||
|
{$endif wasm}
|
||||||
cpubase,objcasm;
|
cpubase,objcasm;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -1552,7 +1555,14 @@ implementation
|
|||||||
{$ifdef WASM}
|
{$ifdef WASM}
|
||||||
ait_local:
|
ait_local:
|
||||||
begin
|
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;
|
end;
|
||||||
ait_importexport:
|
ait_importexport:
|
||||||
begin
|
begin
|
||||||
|
@ -84,6 +84,8 @@ interface
|
|||||||
'grow_memory', 'current_memory'
|
'grow_memory', 'current_memory'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
gas_wasm_basic_type_str : array [TWasmBasicType] of string = ('i32','i64','f32','f64');
|
||||||
|
|
||||||
function gas_regname(r:Tregister):string;
|
function gas_regname(r:Tregister):string;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user