mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 04:29:42 +02:00
* fold the MIPS tabitype into tabi as the former wasn't really used or hooked up anyway; this way the ABI can be set using -Ca<abi>
This commit is contained in:
parent
8c2aca6ece
commit
f584c559fd
@ -57,6 +57,26 @@ unit cpugas;
|
||||
globals, verbose, itcpugas, cgbase, cgutils;
|
||||
|
||||
|
||||
{ abi strings as accepted by
|
||||
GNU assembler in -abi=XXX option }
|
||||
function gas_abitype(abi : tabi) : string;
|
||||
begin
|
||||
case abi of
|
||||
abi_eabi:
|
||||
result:='eabi';
|
||||
abi_mips_o32:
|
||||
result:='32';
|
||||
abi_mips_n32:
|
||||
result:='n32';
|
||||
abi_mips_o64:
|
||||
result:='o64';
|
||||
abi_mips_n64:
|
||||
result:='64';
|
||||
else
|
||||
result:='32';
|
||||
end;
|
||||
end;
|
||||
|
||||
function asm_regname(reg : TRegister) : string;
|
||||
|
||||
begin
|
||||
@ -83,7 +103,7 @@ unit cpugas;
|
||||
begin
|
||||
result := Inherited MakeCmdLine;
|
||||
{ ABI selection }
|
||||
Replace(result,'$ABI','-mabi='+abitypestr[mips_abi]);
|
||||
Replace(result,'$ABI','-mabi='+gas_abitype(target_info.abi));
|
||||
{ ARCH selection }
|
||||
Replace(result,'$ARCH','-march='+lower(cputypestr[current_settings.cputype]));
|
||||
// Replace(result,'$ARCH','-march=pic32mx -mtune=pic32mx');
|
||||
|
@ -19,7 +19,8 @@ Unit CPUInfo;
|
||||
Interface
|
||||
|
||||
uses
|
||||
globtype;
|
||||
globtype,
|
||||
systems;
|
||||
|
||||
Type
|
||||
bestreal = double;
|
||||
@ -47,17 +48,6 @@ Type
|
||||
|
||||
tfputype =(fpu_none,fpu_soft,fpu_mips2,fpu_mips3);
|
||||
|
||||
tabitype =
|
||||
(
|
||||
abi_none,
|
||||
abi_default,
|
||||
abi_o32,
|
||||
abi_n32,
|
||||
abi_o64,
|
||||
abi_n64,
|
||||
abi_eabi
|
||||
);
|
||||
|
||||
Const
|
||||
{# Size of native extended floating point type }
|
||||
extended_size = 8;
|
||||
@ -92,20 +82,6 @@ Const
|
||||
'MIPS2','MIPS3'
|
||||
);
|
||||
|
||||
{ abi strings as accepted by
|
||||
GNU assembler in -abi=XXX option }
|
||||
abitypestr : array[tabitype] of string[4] =
|
||||
({ abi_none } '',
|
||||
{ abi_default } '32',
|
||||
{ abi_o32 } '32',
|
||||
{ abi_n32 } 'n32',
|
||||
{ abi_o64 } 'o64',
|
||||
{ abi_n64 } '64',
|
||||
{ abi_eabi } 'eabi'
|
||||
);
|
||||
|
||||
mips_abi : tabitype = abi_default;
|
||||
|
||||
type
|
||||
tcpuflags=(
|
||||
CPUMIPS_HAS_CMOV, { conditional move instructions (mips4+) }
|
||||
@ -248,26 +224,6 @@ const
|
||||
level3optimizerswitches = level2optimizerswitches;
|
||||
level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
|
||||
|
||||
function SetMipsABIType(const s : string) : boolean;
|
||||
|
||||
Implementation
|
||||
|
||||
uses
|
||||
cutils;
|
||||
|
||||
function SetMipsABIType(const s : string) : boolean;
|
||||
|
||||
var
|
||||
abi : tabitype;
|
||||
begin
|
||||
SetMipsABIType:=false;
|
||||
for abi := low(tabitype) to high(tabitype) do
|
||||
if (lower(s)=abitypestr[abi]) then
|
||||
begin
|
||||
mips_abi:=abi;
|
||||
SetMipsABIType:=true;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -389,6 +389,10 @@
|
||||
,abi_i386_dynalignedstack
|
||||
,abi_xtensa_windowed
|
||||
,abi_xtensa_call0
|
||||
,abi_mips_o32
|
||||
,abi_mips_n32
|
||||
,abi_mips_o64
|
||||
,abi_mips_n64
|
||||
);
|
||||
|
||||
tcgbackend = (
|
||||
|
@ -490,7 +490,7 @@ interface
|
||||
(name: 'AIX' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}),
|
||||
(name: 'DARWIN' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}),
|
||||
(name: 'ELFV2' ; supported:{$if defined(powerpc64)}true{$else}false{$endif}),
|
||||
(name: 'EABI' ; supported:{$if defined(arm)}true{$else}false{$endif}),
|
||||
(name: 'EABI' ; supported:{$if defined(arm) or defined(mips)}true{$else}false{$endif}),
|
||||
(name: 'ARMEB' ; supported:{$ifdef FPC_ARMEB}true{$else}false{$endif}),
|
||||
(name: 'EABIHF' ; supported:{$if defined(arm)}true{$else}false{$endif}),
|
||||
(name: 'OLDWIN32GNU'; supported:{$ifdef I386}true{$else}false{$endif}),
|
||||
@ -504,7 +504,11 @@ interface
|
||||
(name: 'RISCV64LPD'; supported:{$if defined(riscv64)}true{$else}false{$endif}),
|
||||
(name: 'LINUX386_SYSV'; supported:{$if defined(i386)}true{$else}false{$endif}),
|
||||
(name: 'WINDOWED'; supported:{$if defined(xtensa)}true{$else}false{$endif}),
|
||||
(name: 'CALL0'; supported:{$if defined(xtensa)}true{$else}false{$endif})
|
||||
(name: 'CALL0'; supported:{$if defined(xtensa)}true{$else}false{$endif}),
|
||||
(name: 'O32'; supported:{$if defined(mips)}true{$else}false{$endif}),
|
||||
(name: 'N32'; supported:{$if defined(mips)}true{$else}false{$endif}),
|
||||
(name: 'O64'; supported:{$if defined(mips)}true{$else}false{$endif}),
|
||||
(name: 'N64'; supported:{$if defined(mips)}true{$else}false{$endif})
|
||||
);
|
||||
|
||||
cgbackend2str: array[tcgbackend] of ansistring = (
|
||||
|
Loading…
Reference in New Issue
Block a user