mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* more fixes to support vasm on arm
* do not crash on empty eabi attribute strings git-svn-id: trunk@49397 -
This commit is contained in:
parent
19876ca805
commit
e9b3db0d78
@ -1,4 +1,4 @@
|
|||||||
{
|
{ f
|
||||||
Copyright (c) 1998-2006 by the Free Pascal team
|
Copyright (c) 1998-2006 by the Free Pascal team
|
||||||
|
|
||||||
This unit implements the generic part of the GNU assembler
|
This unit implements the generic part of the GNU assembler
|
||||||
@ -1408,7 +1408,8 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if ((target_info.system <> system_arm_linux) and (target_info.system <> system_arm_android)) then
|
if ((target_info.system <> system_arm_linux) and (target_info.system <> system_arm_android)) or
|
||||||
|
(target_asm.id=as_arm_vasm) then
|
||||||
sepChar := '@'
|
sepChar := '@'
|
||||||
else
|
else
|
||||||
sepChar := '#';
|
sepChar := '#';
|
||||||
@ -1617,15 +1618,24 @@ implementation
|
|||||||
end;
|
end;
|
||||||
ait_eabi_attribute:
|
ait_eabi_attribute:
|
||||||
begin
|
begin
|
||||||
case tai_eabi_attribute(hp).eattr_typ of
|
{ as of today, vasm does not support the eabi directives }
|
||||||
eattrtype_dword:
|
if target_asm.id<>as_arm_vasm then
|
||||||
writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+','+tostr(tai_eabi_attribute(hp).value));
|
begin
|
||||||
eattrtype_ntbs:
|
case tai_eabi_attribute(hp).eattr_typ of
|
||||||
writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+',"'+tai_eabi_attribute(hp).valuestr^+'"');
|
eattrtype_dword:
|
||||||
else
|
writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+','+tostr(tai_eabi_attribute(hp).value));
|
||||||
Internalerror(2019100601);
|
eattrtype_ntbs:
|
||||||
end;
|
begin
|
||||||
writer.AsmLn;
|
if assigned(tai_eabi_attribute(hp).valuestr) then
|
||||||
|
writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+',"'+tai_eabi_attribute(hp).valuestr^+'"')
|
||||||
|
else
|
||||||
|
writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+',""');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Internalerror(2019100601);
|
||||||
|
end;
|
||||||
|
writer.AsmLn;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef WASM}
|
{$ifdef WASM}
|
||||||
|
@ -84,6 +84,27 @@ unit agarmvasm;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
const
|
||||||
|
cputype_to_vasm_march : array[tcputype] of string = (
|
||||||
|
'', // cpu_none
|
||||||
|
'a2',
|
||||||
|
'a3',
|
||||||
|
'a4',
|
||||||
|
'a4t',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'');
|
||||||
|
|
||||||
function TARMVASM.MakeCmdLine: TCmdStr;
|
function TARMVASM.MakeCmdLine: TCmdStr;
|
||||||
var
|
var
|
||||||
objtype: string;
|
objtype: string;
|
||||||
@ -99,7 +120,7 @@ unit agarmvasm;
|
|||||||
|
|
||||||
Replace(result,'$ASM',maybequoted(ScriptFixFileName(AsmFileName)));
|
Replace(result,'$ASM',maybequoted(ScriptFixFileName(AsmFileName)));
|
||||||
Replace(result,'$OBJ',maybequoted(ScriptFixFileName(ObjFileName)));
|
Replace(result,'$OBJ',maybequoted(ScriptFixFileName(ObjFileName)));
|
||||||
Replace(result,'$ARCH','-m'+cputype_to_gas_march[current_settings.cputype]);
|
Replace(result,'$ARCH','-'+cputype_to_vasm_march[current_settings.cputype]);
|
||||||
Replace(result,'$OTYPE',objtype);
|
Replace(result,'$OTYPE',objtype);
|
||||||
Replace(result,'$EXTRAOPT',asmextraopt);
|
Replace(result,'$EXTRAOPT',asmextraopt);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user