From e1f21fb1e364ce49b1d47fed291ea5090262c67c Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 26 Feb 2016 20:50:41 +0000 Subject: [PATCH] + handle the asd_cpu directive (commented out, but without producing an internal error) on all the remaining external assemblers, so it is safe to emit on all platforms git-svn-id: trunk@33122 - --- compiler/jvm/agjasmin.pas | 4 ++++ compiler/llvm/agllvm.pas | 3 +++ compiler/powerpc/agppcmpw.pas | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/compiler/jvm/agjasmin.pas b/compiler/jvm/agjasmin.pas index d0007cf2b6..b94a1991a8 100644 --- a/compiler/jvm/agjasmin.pas +++ b/compiler/jvm/agjasmin.pas @@ -502,6 +502,10 @@ implementation ait_directive : begin + { the CPU directive is probably not supported by the JVM assembler, + so it's commented out } + if tai_directive(hp).directive=asd_cpu then + writer.AsmWrite(asminfo^.comment); writer.AsmWrite('.'+directivestr[tai_directive(hp).directive]+' '); if tai_directive(hp).name<>'' then writer.AsmWrite(tai_directive(hp).name); diff --git a/compiler/llvm/agllvm.pas b/compiler/llvm/agllvm.pas index 081197e3ad..8921708e9b 100644 --- a/compiler/llvm/agllvm.pas +++ b/compiler/llvm/agllvm.pas @@ -1120,6 +1120,9 @@ implementation ait_directive : begin + { CPU directive is commented out for the LLVM } + if tai_directive(hp).directive=asd_cpu then + writer.AsmWrite(asminfo^.comment); WriteDirectiveName(tai_directive(hp).directive); if tai_directive(hp).name <>'' then writer.AsmWrite(tai_directive(hp).name); diff --git a/compiler/powerpc/agppcmpw.pas b/compiler/powerpc/agppcmpw.pas index e90f28fd1d..c5ff26dbb7 100644 --- a/compiler/powerpc/agppcmpw.pas +++ b/compiler/powerpc/agppcmpw.pas @@ -1093,6 +1093,16 @@ interface else if tai_marker(hp).kind=mark_NoLineInfoEnd then dec(InlineLevel); end; + ait_directive : + if tai_directive(hp).directive=asd_cpu then + begin + writer.AsmWrite(asminfo^.comment+' CPU '); + if tai_directive(hp).name<>'' then + writer.AsmWrite(tai_directive(hp).name); + writer.AsmLn; + end + else + internalerror(2016022601); else internalerror(2002110303); end;