|
@@ -68,7 +68,7 @@ unit agcpugas;
|
|
const
|
|
const
|
|
cputype_to_gas_march : array[tcputype] of string = (
|
|
cputype_to_gas_march : array[tcputype] of string = (
|
|
'', // cpu_none
|
|
'', // cpu_none
|
|
- '', // armv8 is not accepted by GNU assembler
|
|
|
|
|
|
+ 'armv8-a', // armv8 is not accepted by GNU assembler
|
|
'armv8-a',
|
|
'armv8-a',
|
|
'armv8.1-a',
|
|
'armv8.1-a',
|
|
'armv8.2-a',
|
|
'armv8.2-a',
|
|
@@ -99,6 +99,22 @@ unit agcpugas;
|
|
cgbase,cgutils;
|
|
cgbase,cgutils;
|
|
|
|
|
|
|
|
|
|
|
|
+ function GetmarchStr : String;
|
|
|
|
+ var
|
|
|
|
+ cf: tcpuflags;
|
|
|
|
+ begin
|
|
|
|
+ Result:='-march='+cputype_to_gas_march[current_settings.cputype];
|
|
|
|
+ for cf in cpu_capabilities[current_settings.cputype] do
|
|
|
|
+ begin
|
|
|
|
+ case cf of
|
|
|
|
+ CPUAARCH64_HAS_SHA2:
|
|
|
|
+ Result:=Result+'+sha2';
|
|
|
|
+ else
|
|
|
|
+ ;
|
|
|
|
+ end
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+
|
|
{****************************************************************************}
|
|
{****************************************************************************}
|
|
{ AArch64 Assembler writer }
|
|
{ AArch64 Assembler writer }
|
|
{****************************************************************************}
|
|
{****************************************************************************}
|
|
@@ -113,7 +129,7 @@ unit agcpugas;
|
|
begin
|
|
begin
|
|
result:=inherited MakeCmdLine;
|
|
result:=inherited MakeCmdLine;
|
|
if cputype_to_gas_march[current_settings.cputype] <> '' then
|
|
if cputype_to_gas_march[current_settings.cputype] <> '' then
|
|
- Replace(result,'$MARCHOPT','-march='+cputype_to_gas_march[current_settings.cputype])
|
|
|
|
|
|
+ Replace(result,'$MARCHOPT',GetmarchStr)
|
|
else
|
|
else
|
|
Replace(result,'$MARCHOPT','');
|
|
Replace(result,'$MARCHOPT','');
|
|
end;
|
|
end;
|
|
@@ -133,7 +149,7 @@ unit agcpugas;
|
|
begin
|
|
begin
|
|
result:=inherited MakeCmdLine;
|
|
result:=inherited MakeCmdLine;
|
|
if cputype_to_gas_march[current_settings.cputype] <> '' then
|
|
if cputype_to_gas_march[current_settings.cputype] <> '' then
|
|
- Replace(result,'$MARCHOPT','-march='+cputype_to_gas_march[current_settings.cputype])
|
|
|
|
|
|
+ Replace(result,'$MARCHOPT',GetmarchStr)
|
|
else
|
|
else
|
|
Replace(result,'$MARCHOPT','');
|
|
Replace(result,'$MARCHOPT','');
|
|
end;
|
|
end;
|