mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 05:59:30 +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}
|
||||
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
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user