Ver código fonte

+ 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 -

nickysn 9 anos atrás
pai
commit
e1f21fb1e3

+ 4 - 0
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);

+ 3 - 0
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);

+ 10 - 0
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;