2
0
Эх сурвалжийг харах

* make local variables in assembler blocks working again after r44933
* test for #37218

git-svn-id: trunk@45667 -

florian 5 жил өмнө
parent
commit
80111a0a60

+ 1 - 0
.gitattributes

@@ -18331,6 +18331,7 @@ tests/webtbs/tw37136.pp svneol=native#text/pascal
 tests/webtbs/tw37154.pp svneol=native#text/pascal
 tests/webtbs/tw37154.pp svneol=native#text/pascal
 tests/webtbs/tw3719.pp svneol=native#text/plain
 tests/webtbs/tw3719.pp svneol=native#text/plain
 tests/webtbs/tw3721.pp svneol=native#text/plain
 tests/webtbs/tw3721.pp svneol=native#text/plain
+tests/webtbs/tw37218.pp svneol=native#text/pascal
 tests/webtbs/tw3742.pp svneol=native#text/plain
 tests/webtbs/tw3742.pp svneol=native#text/plain
 tests/webtbs/tw3751.pp svneol=native#text/plain
 tests/webtbs/tw3751.pp svneol=native#text/plain
 tests/webtbs/tw3758.pp svneol=native#text/plain
 tests/webtbs/tw3758.pp svneol=native#text/plain

+ 1 - 1
compiler/aarch64/racpugas.pas

@@ -838,7 +838,7 @@ Unit racpugas;
                           else
                           else
                             Message1(sym_e_unknown_id,expr);
                             Message1(sym_e_unknown_id,expr);
                         end
                         end
-                       else
+                       else if oper.opr.typ<>OPR_LOCAL then
                          begin
                          begin
                            oper.InitRef;
                            oper.InitRef;
                            MaybeAddGotAddrMode;
                            MaybeAddGotAddrMode;

+ 1 - 1
compiler/rautils.pas

@@ -1098,7 +1098,7 @@ end;
 
 
 procedure TOperand.InitRef;
 procedure TOperand.InitRef;
 {*********************************************************************}
 {*********************************************************************}
-{  Description: This routine first check if the opcode is of     }
+{  Description: This routine first check if the opcode is of          }
 {  type OPR_NONE, or OPR_REFERENCE , if not it gives out an error.    }
 {  type OPR_NONE, or OPR_REFERENCE , if not it gives out an error.    }
 {  If the operandtype = OPR_NONE or <> OPR_REFERENCE then it sets up  }
 {  If the operandtype = OPR_NONE or <> OPR_REFERENCE then it sets up  }
 {  the operand type to OPR_REFERENCE, as well as setting up the ref   }
 {  the operand type to OPR_REFERENCE, as well as setting up the ref   }

+ 22 - 0
tests/webtbs/tw37218.pp

@@ -0,0 +1,22 @@
+{ %CPU=aarch64 }
+program project1;
+uses crt;
+procedure test;
+var a:uint64;
+begin
+a:=1;
+    asm
+    mov x4,# 0
+    mov x12,# 1
+    add x4,x4,x12,lsl # 2
+    str x4, a
+    end;
+
+  writeln(a);
+  if a<>4 then
+     halt(1);
+end;
+
+begin
+test;
+end.