Add clang as assembler for powerpc-darwin (powerpc64 is apparently not yet supported for MachO format)

git-svn-id: trunk@38161 -
This commit is contained in:
pierre 2018-02-08 09:38:16 +00:00
parent 948d12ea73
commit ed695624ab
2 changed files with 21 additions and 1 deletions

View File

@ -719,10 +719,24 @@ unit agppcgas;
dollarsign : '.'
);
as_ppc_clang_darwin_info : tasminfo =
(
id : as_clang;
idtxt : 'CLANG';
asmbin : 'clang';
asmcmd : '-c -o $OBJ $EXTRAOPT -arch $ARCH $DARWINVERSION -x assembler $ASM';
supported_targets : [system_powerpc_darwin, system_powerpc64_darwin];
flags : [af_needar,af_smartlink_sections,af_supports_dwarf];
labelprefix : 'L';
comment : '# ';
dollarsign: '$';
);
begin
RegisterAssembler(as_ppc_gas_info,TPPCGNUAssembler);
RegisterAssembler(as_ppc_gas_legacy_info,TPPCGNUAssembler);
RegisterAssembler(as_ppc_gas_darwin_powerpc_info,TPPCAppleGNUAssembler);
RegisterAssembler(as_ppc_clang_darwin_info,TPPCAppleGNUAssembler);
RegisterAssembler(as_ppc_aix_powerpc_info,TPPCAIXAssembler);
RegisterAssembler(as_ppc_gas_aix_powerpc_info,TPPCAIXAssembler);
end.

View File

@ -326,7 +326,13 @@ implementation
ltn,lten,gtn,gten,
equaln,unequaln :
begin
op:=A_FCMPO;
{ clang does not recognize fcmpo instruction,
so we need to fall back to fcmpu, which does not
generate the same exeception information }
if target_asm.id = as_clang then
op:=A_FCMPU
else
op:=A_FCMPO;
cmpop:=true;
end;
else