Add -Aas-sol to use native Solaris assembler

git-svn-id: trunk@32188 -
This commit is contained in:
pierre 2015-10-29 15:10:27 +00:00
parent 92a39c93f5
commit 90ff332b49
4 changed files with 45 additions and 3 deletions

View File

@ -133,6 +133,13 @@ implementation
#9'.short'#9,#9'.long'#9,#9'.quad'#9
);
ait_solaris_const2str : array[aitconst_128bit..aitconst_64bit_unaligned] of string[20]=(
#9'.fixme128'#9,#9'.8byte'#9,#9'.4byte'#9,#9'.2byte'#9,#9'.byte'#9,
#9'.sleb128'#9,#9'.uleb128'#9,
#9'.rva'#9,#9'.secrel32'#9,#9'.8byte'#9,#9'.4byte'#9,#9'.2byte'#9,#9'.2byte'#9,
#9'.2byte'#9,#9'.4byte'#9,#9'.8byte'#9
);
ait_unaligned_consts = [aitconst_16bit_unaligned..aitconst_64bit_unaligned];
{ Sparc type of unaligned pseudo-instructions }
@ -951,6 +958,8 @@ implementation
unaligned tai -> always use vbyte }
else if target_info.system in systems_aix then
writer.AsmWrite(#9'.vbyte'#9+tostr(tai_const(hp).size)+',')
else if (asminfo^.id=as_solaris_as) then
writer.AsmWrite(ait_solaris_const2str[constdef])
else
writer.AsmWrite(ait_const2str[constdef]);
l:=0;

View File

@ -735,7 +735,7 @@ Implementation
begin
DoPipe:=(cs_asm_pipe in current_settings.globalswitches) and
(([cs_asm_extern,cs_asm_leave,cs_link_on_target] * current_settings.globalswitches) = []) and
((asminfo^.id in [as_gas,as_ggas,as_darwin,as_powerpc_xcoff,as_clang]));
((asminfo^.id in [as_gas,as_ggas,as_darwin,as_powerpc_xcoff,as_clang,as_solaris_as]));
end;

View File

@ -221,6 +221,7 @@
,as_i8086_omf
,as_llvm
,as_clang
,as_solaris_as
);
tlink = (ld_none,

View File

@ -296,7 +296,7 @@ interface
calljmp:=is_calljmp(op);
// BUGFIX GAS-assembler
// Intel "Intel 64 and IA-32 Architectures Software Developers manual 12/2011
// Intel "Intel 64 and IA-32 Architectures Software Developers manual 12/2011"
// Intel: VCVTDQ2PD YMMREG, YMMREG/mem128 ((intel syntax))
// GAS: VCVTDQ2PD YMMREG, XMMREG/mem128 ((intel syntax))
if (op = A_VCVTDQ2PD) and
@ -356,13 +356,14 @@ interface
(op<>A_FLDCW) and
(not fskipPopcountSuffix or
(op<>A_POPCNT)) and
((owner.asminfo^.id=as_solaris_as) and (op<>A_Jcc) and (op<>A_SETcc)) and
not(
(taicpu(hp).ops<>0) and
(taicpu(hp).oper[0]^.typ=top_reg) and
(getregtype(taicpu(hp).oper[0]^.reg)=R_FPUREGISTER)
) then
begin
if gas_needsuffix[op] = AttSufMM then
if (gas_needsuffix[op] = AttSufMM)then
begin
for i:=0 to taicpu(hp).ops-1 do
begin
@ -470,6 +471,20 @@ interface
);
as_x86_64_solaris_info : tasminfo =
(
id : as_solaris_as;
idtxt : 'AS-SOL';
asmbin : 'as';
asmcmd : ' -m64 -o $OBJ $EXTRAOPT $ASM';
supported_targets : [system_x86_64_solaris];
flags : [af_needar,af_smartlink_sections,af_supports_dwarf];
labelprefix : '.L';
comment : '# ';
dollarsign: '$';
);
as_x86_64_gas_darwin_info : tasminfo =
(
@ -586,6 +601,21 @@ interface
comment : '# ';
dollarsign: '$';
);
as_i386_solaris_info : tasminfo =
(
id : as_solaris_as;
idtxt : 'AS-SOL';
asmbin : 'as';
asmcmd : ' -o $OBJ $EXTRAOPT $ASM';
supported_targets : [system_i386_solaris];
flags : [af_needar,af_smartlink_sections,af_supports_dwarf];
labelprefix : '.L';
comment : '# ';
dollarsign: '$';
);
{$endif x86_64}
initialization
@ -595,6 +625,7 @@ initialization
RegisterAssembler(as_x86_64_gas_info,Tx86ATTAssembler);
RegisterAssembler(as_x86_64_gas_darwin_info,Tx86AppleGNUAssembler);
RegisterAssembler(as_x86_64_clang_darwin_info,Tx86AppleGNUAssembler);
RegisterAssembler(as_x86_64_solaris_info,Tx86ATTAssembler);
{$else x86_64}
RegisterAssembler(as_i386_as_info,Tx86ATTAssembler);
RegisterAssembler(as_i386_gas_info,Tx86ATTAssembler);
@ -602,5 +633,6 @@ initialization
RegisterAssembler(as_i386_gas_darwin_info,Tx86AppleGNUAssembler);
RegisterAssembler(as_i386_clang_darwin_info,Tx86AppleGNUAssembler);
RegisterAssembler(as_i386_as_aout_info,Tx86AoutGNUAssembler);
RegisterAssembler(as_i386_solaris_info,Tx86ATTAssembler);
{$endif x86_64}
end.