* finished -ix output

git-svn-id: trunk@48936 -
This commit is contained in:
florian 2021-03-10 20:33:49 +00:00
parent 45dc6d1ef1
commit 8fa04a0cee

View File

@ -283,6 +283,22 @@ const
end;
end;
procedure ListOSTargetsXML;
var
target : tsystem;
begin
WriteLn(xmloutput,' <ostargets>');
for target:=low(tsystem) to high(tsystem) do
if assigned(targetinfos[target]) then
begin
Write(xmloutput,' <ostarget shortname="',targetinfos[target]^.shortname,'" name="',targetinfos[target]^.name,'"');
if tf_under_development in targetinfos[target]^.flags then
Write(' experimental="1"');
WriteLn('/>');
end;
WriteLn(xmloutput,' </ostargets>');
end;
procedure ListCPUInstructionSets (OrigString: TCmdStr);
var
cpu : tcputype;
@ -321,6 +337,17 @@ const
end;
end;
procedure ListCPUInstructionSetsXML;
var
cpu : tcputype;
begin
WriteLn(xmloutput,' <cpuinstructionsets>');
for cpu:=low(tcputype) to high(tcputype) do
if CPUTypeStr [CPU] <> '' then
WriteLn(xmloutput,' <cpuinstructionset name="',CPUTypeStr [CPU], '"/>');
WriteLn(xmloutput,' </cpuinstructionsets>');
end;
procedure ListFPUInstructionSets (OrigString: TCmdStr);
var
fpu : tfputype;
@ -359,6 +386,17 @@ const
end;
end;
procedure ListFPUInstructionSetsXML;
var
fpu : tfputype;
begin
WriteLn(xmloutput,' <fpuinstructionsets>');
for fpu:=low(tfputype) to high(tfputype) do
if FPUTypeStr [fpu] <> '' then
WriteLn(xmloutput,' <cpuinstructionset name="',FPUTypeStr [fpu], '"/>');
WriteLn(xmloutput,' </fpuinstructionsets>');
end;
procedure ListABITargets (OrigString: TCmdStr);
var
abi : tabi;
@ -383,6 +421,21 @@ const
end;
end;
procedure ListABITargetsXML;
var
abi : tabi;
begin
WriteLn(xmloutput,' <abis>');
for abi:=low(abi) to high(abi) do
begin
if not abiinfo[abi].supported then
continue;
if abiinfo[abi].name<>'' then;
WriteLn(xmloutput,' <abi name="',abiinfo[abi].name, '"/>');
end;
WriteLn(xmloutput,' </abis>');
end;
procedure ListOptimizations (OrigString: TCmdStr);
var
opt : toptimizerswitch;
@ -412,11 +465,11 @@ const
var
opt: toptimizerswitch;
begin
WriteLn(xmloutput,'<optimizations>');
WriteLn(xmloutput,' <optimizations>');
for opt:=low(toptimizerswitch) to high(toptimizerswitch) do
if OptimizerSwitchStr[opt]<>'' then
WriteLn(xmloutput,'<optimization name="',OptimizerSwitchStr[opt],'"/>');
WriteLn(xmloutput,'</optimizations>');
WriteLn(xmloutput,' <optimization name="',OptimizerSwitchStr[opt],'"/>');
WriteLn(xmloutput,' </optimizations>');
end;
procedure ListWPOptimizations (OrigString: TCmdStr);
@ -446,6 +499,17 @@ const
end;
end;
procedure ListWPOptimizationsXML;
var
wpopt: twpoptimizerswitch;
begin
WriteLn(xmloutput,' <wpoptimizations>');
for wpopt:=low(twpoptimizerswitch) to high(twpoptimizerswitch) do
if WPOptimizerSwitchStr[wpopt]<>'' then
WriteLn(xmloutput,' <wpoptimization name="',WPOptimizerSwitchStr[wpopt],'"/>');
WriteLn(xmloutput,' </wpoptimizations>');
end;
procedure ListAsmModes (OrigString: TCmdStr);
var
asmmode : tasmmode;
@ -469,6 +533,17 @@ const
end;
end;
procedure ListAsmModesXML;
var
asmmode : tasmmode;
begin
WriteLn(xmloutput,' <asmmodes>');
for asmmode:=low(tasmmode) to high(tasmmode) do
if assigned(asmmodeinfos[asmmode]) then
WriteLn(xmloutput,' <asmmode name="',asmmodeinfos[asmmode]^.idtxt,'"/>');
WriteLn(xmloutput,' </asmmodes>');
end;
procedure ListControllerTypes (OrigString: TCmdStr);
var
controllertype : tcontrollertype;
@ -522,11 +597,11 @@ const
{$WARN 6018 OFF} (* Unreachable code due to compile time evaluation *)
if (ControllerSupport) then
begin
WriteLn(xmloutput,'<controllertypes>');
WriteLn(xmloutput,' <controllertypes>');
for controllertype:=low(tcontrollertype) to high(tcontrollertype) do
if embedded_controllers[controllertype].ControllerTypeStr<>'' then
WriteLn(xmloutput,'<controllertype name="',embedded_controllers[controllertype].ControllerTypeStr,'"/>');
WriteLn(xmloutput,'</controllertypes>');
WriteLn(xmloutput,' <controllertype name="',embedded_controllers[controllertype].ControllerTypeStr,'"/>');
WriteLn(xmloutput,' </controllertypes>');
end;
{$POP}
end;
@ -569,6 +644,17 @@ const
end;
end;
procedure ListFeaturesXML;
var
Feature: TFeature;
begin
WriteLn(xmloutput,' <features>');
for Feature := Low (TFeature) to High (TFeature) do
if FeatureStr [Feature] <> '' then
WriteLn(xmloutput,' <feature name="',FeatureStr [Feature],'"/>');
WriteLn(xmloutput,' </features>');
end;
procedure ListModeswitches (OrigString: TCmdStr);
var
Modeswitch: TModeswitch;
@ -607,6 +693,17 @@ const
end;
end;
procedure ListModeswitchesXML;
var
Modeswitch: TModeswitch;
begin
WriteLn(xmloutput,' <modeswitches>');
for Modeswitch:=Low(TModeswitch) to High(TModeswitch) do
if ModeswitchStr [Modeswitch]<>'' then
WriteLn(xmloutput,' <modeswitch name="',ModeswitchStr [Modeswitch],'"/>');
WriteLn(xmloutput,' </modeswitches>');
end;
procedure ListCodeGenerationBackend (OrigString: TCmdStr);
begin
SplitLine (OrigString, CodeGenerationBackendPlaceholder, HS3);
@ -621,6 +718,11 @@ const
end;
end;
procedure ListCodeGenerationBackendXML;
begin
WriteLn(xmloutput,' <codegeneratorbackend>',cgbackend2str[cgbackend],'</codegeneratorbackend>');
end;
begin
if More = '' then
begin
@ -662,10 +764,19 @@ begin
Rewrite(xmloutput);
WriteLn(xmloutput,'<?xml version="1.0" encoding="utf-8"?>');
WriteLn(xmloutput,'<fpcoutput>');
WriteLn(xmloutput,'<info>');
WriteLn(xmloutput,' <info>');
ListOSTargetsXML;
ListCPUInstructionSetsXML;
ListFPUInstructionSetsXML;
ListABITargetsXML;
ListOptimizationsXML;
ListWPOptimizationsXML;
ListModeswitchesXML;
ListAsmModesXML;
ListControllerTypesXML;
WriteLn(xmloutput,'</info>');
ListFeaturesXML;
ListCodeGenerationBackendXML;
WriteLn(xmloutput,' </info>');
WriteLn(xmloutput,'</fpcoutput>');
Close(xmloutput);
end