Kaynağa Gözat

* bail out early in tcgaarch64.make_simple_ref if possible

florian 1 yıl önce
ebeveyn
işleme
6c50c02f7c
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      compiler/aarch64/cgcpu.pas

+ 3 - 0
compiler/aarch64/cgcpu.pas

@@ -312,6 +312,9 @@ implementation
         { base + offset }
         { base + offset }
         if ref.base<>NR_NO then
         if ref.base<>NR_NO then
           begin
           begin
+            if ref.offset=0 then
+              exit;
+
             { valid offset for LDUR/STUR -> use that }
             { valid offset for LDUR/STUR -> use that }
             if (ref.addressmode=AM_OFFSET) and
             if (ref.addressmode=AM_OFFSET) and
                (op in [A_LDR,A_STR]) and
                (op in [A_LDR,A_STR]) and