Przeglądaj źródła

+ Aaarch64: support adr instructions with local labels in the assembler reader
+ throw an error if an illegal instruction extension is passed as command line option

florian 3 lat temu
rodzic
commit
67f3a7502d
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 1 1
      compiler/aarch64/aasmcpu.pas
  2. 3 0
      compiler/options.pas

+ 1 - 1
compiler/aarch64/aasmcpu.pas

@@ -671,7 +671,7 @@ implementation
           exit;
         { "ldr literal" must be a 32/64 bit LDR and have a symbol }
         if (ref.refaddr=addr_pic) and
-           (not (op in [A_LDR,A_B,A_BL]) or
+           (not (op in [A_LDR,A_B,A_BL,A_ADR]) or
             not(oppostfix in [PF_NONE,PF_W,PF_SW]) or
             (not assigned(ref.symbol) and
              not assigned(ref.symboldata))) then

+ 3 - 0
compiler/options.pas

@@ -1630,9 +1630,12 @@ begin
                                 if s=cpuflagsstr then
                                   begin
                                     Include(cpu_capabilities[init_settings.cputype],cf);
+                                    s:='';
                                     break;
                                   end;
                               end;
+                            if s<>'' then
+                              IllegalPara(opt);
                           end;
 {$endif cpucapabilities}
                         CPUSetExplicitly:=true;