mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:39:25 +02:00
[PATCH 02/83] updating common FPC sources for WASM target
From 7705a37c1f11687c3d465c4645357d6679150996 Mon Sep 17 00:00:00 2001 From: Dmitry Boyarintsev <skalogryz.lists@gmail.com> Date: Wed, 28 Aug 2019 17:01:14 -0400 git-svn-id: branches/wasm@45879 -
This commit is contained in:
parent
5daf992919
commit
95bed362ba
@ -280,6 +280,10 @@ interface
|
||||
,top_fenceflags
|
||||
,top_roundingmode
|
||||
{$endif defined(riscv32) or defined(riscv64)}
|
||||
{$ifdef wasm}
|
||||
,top_single
|
||||
,top_double
|
||||
{$endif wasm}
|
||||
);
|
||||
|
||||
{ kinds of operations that an instruction can perform on an operand }
|
||||
@ -497,6 +501,10 @@ interface
|
||||
top_fenceflags : (fenceflags : TFenceFlags);
|
||||
top_roundingmode : (roundingmode : TRoundingMode);
|
||||
{$endif defined(riscv32) or defined(riscv64)}
|
||||
{$ifdef wasm}
|
||||
top_single : (sval:single);
|
||||
top_double : (dval:double);
|
||||
{$endif wasm}
|
||||
end;
|
||||
poper=^toper;
|
||||
|
||||
|
@ -106,6 +106,13 @@ unit cgutils;
|
||||
indexoffset: aint;
|
||||
checkcast: boolean;
|
||||
{$endif jvm}
|
||||
{$ifdef wasm}
|
||||
arrayreftype: tarrayreftype;
|
||||
indexbase: tregister;
|
||||
indexsymbol: tasmsymbol;
|
||||
indexoffset: aint;
|
||||
checkcast: boolean;
|
||||
{$endif wasm}
|
||||
volatility: tvolatilityset;
|
||||
alignment : byte;
|
||||
end;
|
||||
|
@ -335,3 +335,13 @@
|
||||
{$define cpucg64shiftsupport}
|
||||
{$define symansistr}
|
||||
{$endif}
|
||||
|
||||
{$ifdef wasm}
|
||||
{$define cpu32bit}
|
||||
{$define cpu64bitalu}
|
||||
{$define cpu32bitaddr}
|
||||
{$define cpuhighleveltarget}
|
||||
{$define symansistr}
|
||||
{$define SUPPORT_GET_FRAME}
|
||||
{$endif}
|
||||
|
||||
|
@ -549,6 +549,12 @@ interface
|
||||
asmcputype : cpu_none;
|
||||
fputype : fpu_fd;
|
||||
{$endif riscv64}
|
||||
{$ifdef wasm}
|
||||
cputype : cpu_none;
|
||||
optimizecputype : cpu_none;
|
||||
asmcputype : cpu_none;
|
||||
fputype : fpu_standard;
|
||||
{$endif wasm}
|
||||
{$endif not GENERIC_CPU}
|
||||
asmmode : asmmode_standard;
|
||||
{$ifndef jvm}
|
||||
|
@ -24,6 +24,11 @@ unit ncgflw;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
{$if defined(jvm) or defined(wasm)}
|
||||
{$define SkipABIEH}
|
||||
{$endif}
|
||||
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -75,9 +80,9 @@ interface
|
||||
|
||||
tcgraisenode = class(traisenode)
|
||||
function pass_1: tnode;override;
|
||||
{$ifndef jvm}
|
||||
{$ifndef SkipABIEH}
|
||||
procedure pass_generate_code;override;
|
||||
{$endif jvm}
|
||||
{$endif SkipABIEH}
|
||||
end;
|
||||
|
||||
tcgtryexceptnode = class(ttryexceptnode)
|
||||
@ -115,9 +120,9 @@ implementation
|
||||
cpubase,
|
||||
tgobj,paramgr,
|
||||
cgobj,hlcgobj,nutils
|
||||
{$ifndef jvm}
|
||||
{$ifndef SkipABIEH}
|
||||
,psabiehpi
|
||||
{$endif jvm}
|
||||
{$endif}
|
||||
;
|
||||
{*****************************************************************************
|
||||
Second_While_RepeatN
|
||||
@ -1112,7 +1117,7 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifndef jvm}
|
||||
{$ifndef SkipABIEH}
|
||||
{ has to be factored out as well }
|
||||
procedure tcgraisenode.pass_generate_code;
|
||||
var
|
||||
@ -1159,7 +1164,7 @@ implementation
|
||||
include(flowcontrol,fc_catching_exceptions);
|
||||
end;
|
||||
end;
|
||||
{$endif jvm}
|
||||
{$endif SkipABIEH}
|
||||
|
||||
|
||||
begin
|
||||
|
@ -176,6 +176,12 @@ program pp;
|
||||
{$endif CPUDEFINED}
|
||||
{$define CPUDEFINED}
|
||||
{$endif RISCV64}
|
||||
{$ifdef WASM}
|
||||
{$ifdef CPUDEFINED}
|
||||
{$fatal ONLY one of the switches for the CPU type must be defined}
|
||||
{$endif CPUDEFINED}
|
||||
{$define CPUDEFINED}
|
||||
{$endif WASM}
|
||||
|
||||
{$ifndef CPUDEFINED}
|
||||
{$fatal A CPU type switch must be defined}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
@ -19,19 +19,17 @@
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="pp.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="pp"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@ -63,12 +61,8 @@
|
||||
<ConfigFile>
|
||||
<StopAfterErrCount Value="50"/>
|
||||
</ConfigFile>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-djvm
|
||||
-dnoopt"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
Loading…
Reference in New Issue
Block a user