|
@@ -23,7 +23,7 @@ interface
|
|
type
|
|
type
|
|
TMachineType = (mtnone, mti386,mtx86_64,mtppc,mtppc64,mtarm,mtarmeb,mtm68k,
|
|
TMachineType = (mtnone, mti386,mtx86_64,mtppc,mtppc64,mtarm,mtarmeb,mtm68k,
|
|
mtsparc,mtalpha,mtia64,mtmips,mtmipsel,mtaarch64,mtppc64le,
|
|
mtsparc,mtalpha,mtia64,mtmips,mtmipsel,mtaarch64,mtppc64le,
|
|
- mtriscv32,mtriscv64,mtloongarch64,mtsparc64,
|
|
|
|
|
|
+ mtriscv32,mtriscv64,mtloongarch64,mtsparc64,mtwasm32,
|
|
mtBigEndian,mtLittleEndian);
|
|
mtBigEndian,mtLittleEndian);
|
|
TMachineTypes = set of TMachineType;
|
|
TMachineTypes = set of TMachineType;
|
|
|
|
|
|
@@ -36,12 +36,12 @@ type
|
|
(subarm: TSubMachineTypeArm);
|
|
(subarm: TSubMachineTypeArm);
|
|
mtnone, mti386,mtx86_64,mtppc,mtppc64,mtm68k,
|
|
mtnone, mti386,mtx86_64,mtppc,mtppc64,mtm68k,
|
|
mtsparc,mtalpha,mtia64,mtmips,mtmipsel,mtaarch64,mtppc64le,
|
|
mtsparc,mtalpha,mtia64,mtmips,mtmipsel,mtaarch64,mtppc64le,
|
|
- mtriscv32,mtriscv64,mtloongarch64,mtsparc64,
|
|
|
|
|
|
+ mtriscv32,mtriscv64,mtloongarch64,mtsparc64,mtwasm32,
|
|
mtBigEndian,mtLittleEndian:
|
|
mtBigEndian,mtLittleEndian:
|
|
(subgen: TSubMachineTypeGeneric);
|
|
(subgen: TSubMachineTypeGeneric);
|
|
end;
|
|
end;
|
|
|
|
|
|
- TObjFormat = (ofNone, ofRes, ofElf, ofCoff, ofXCoff, ofMachO, ofExt);
|
|
|
|
|
|
+ TObjFormat = (ofNone, ofRes, ofElf, ofCoff, ofXCoff, ofMachO, ofWasm, ofExt);
|
|
TObjFormats = set of TObjFormat;
|
|
TObjFormats = set of TObjFormat;
|
|
|
|
|
|
|
|
|
|
@@ -91,6 +91,7 @@ var
|
|
(name : 'riscv64'; formats : [ofElf]), //mtriscv64
|
|
(name : 'riscv64'; formats : [ofElf]), //mtriscv64
|
|
(name : 'loongarch64'; formats : [ofElf]), //mtloongarch64
|
|
(name : 'loongarch64'; formats : [ofElf]), //mtloongarch64
|
|
(name : 'sparc64'; formats : [ofElf]), //mtsparc64
|
|
(name : 'sparc64'; formats : [ofElf]), //mtsparc64
|
|
|
|
+ (name : 'wasm32'; formats : [ofWasm]), //mtwasm32
|
|
(name : 'bigendian'; formats : [ofExt]), //mtBigEndian
|
|
(name : 'bigendian'; formats : [ofExt]), //mtBigEndian
|
|
(name : 'littleendian'; formats : [ofExt]) //mtLittleEndian
|
|
(name : 'littleendian'; formats : [ofExt]) //mtLittleEndian
|
|
);
|
|
);
|
|
@@ -116,6 +117,7 @@ var
|
|
(name : 'xcoff'; ext : '.o'; machines : [mtppc{,mtppc64}]),
|
|
(name : 'xcoff'; ext : '.o'; machines : [mtppc{,mtppc64}]),
|
|
(name : 'mach-o'; ext : '.or'; machines : [mti386,mtx86_64,mtppc,
|
|
(name : 'mach-o'; ext : '.or'; machines : [mti386,mtx86_64,mtppc,
|
|
mtppc64,mtarm,mtaarch64]),
|
|
mtppc64,mtarm,mtaarch64]),
|
|
|
|
+ (name : 'wasm'; ext : '.or'; machines : [mtwasm32]),
|
|
(name : 'external'; ext : '.fpcres'; machines : [mtBigEndian,mtLittleEndian])
|
|
(name : 'external'; ext : '.fpcres'; machines : [mtBigEndian,mtLittleEndian])
|
|
);
|
|
);
|
|
|
|
|
|
@@ -179,6 +181,9 @@ var
|
|
{$elseif defined(CPULOONGARCH64)}
|
|
{$elseif defined(CPULOONGARCH64)}
|
|
machine : mtloongarch64;
|
|
machine : mtloongarch64;
|
|
submachine : (subgen: smtgen_all);
|
|
submachine : (subgen: smtgen_all);
|
|
|
|
+ {$elseif defined(CPUWASM32)}
|
|
|
|
+ machine : mtwasm32;
|
|
|
|
+ submachine : (subgen: smtgen_all);
|
|
{$else}
|
|
{$else}
|
|
machine : mti386; //default i386
|
|
machine : mti386; //default i386
|
|
submachine : (subgen: smtgen_all);
|
|
submachine : (subgen: smtgen_all);
|
|
@@ -191,6 +196,8 @@ var
|
|
objformat : ofMachO;
|
|
objformat : ofMachO;
|
|
{$ELSEIF defined(AIX)}
|
|
{$ELSEIF defined(AIX)}
|
|
objformat : ofXCoff;
|
|
objformat : ofXCoff;
|
|
|
|
+ {$ELSEIF defined(WASI)}
|
|
|
|
+ objformat : ofWasm;
|
|
{$ELSE}
|
|
{$ELSE}
|
|
objformat : ofElf;
|
|
objformat : ofElf;
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
@@ -209,6 +216,7 @@ begin
|
|
ofCoff : Result:=mti386;
|
|
ofCoff : Result:=mti386;
|
|
ofXCoff: Result:=mtppc;
|
|
ofXCoff: Result:=mtppc;
|
|
ofMachO: Result:=mti386;
|
|
ofMachO: Result:=mti386;
|
|
|
|
+ ofWasm : Result:=mtwasm32;
|
|
{$IFDEF ENDIAN_BIG}
|
|
{$IFDEF ENDIAN_BIG}
|
|
ofExt : Result:=mtBigEndian;
|
|
ofExt : Result:=mtBigEndian;
|
|
{$ELSE}
|
|
{$ELSE}
|