浏览代码

Allow correct parsing of ld [%g1 + %l7], %g1

git-svn-id: trunk@22473 -
pierre 13 年之前
父节点
当前提交
fbd5d13b9f
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      compiler/sparc/racpugas.pas

+ 9 - 4
compiler/sparc/racpugas.pas

@@ -130,9 +130,9 @@ Interface
         Consume(AS_LBRACKET);
         repeat
           Case actasmtoken of
+            AS_PLUS,
             AS_INTNUM,
-            AS_MINUS,
-            AS_PLUS:
+            AS_MINUS:
               Begin
                 if hasimm or (regs>1) then
                  Begin
@@ -140,8 +140,13 @@ Interface
                    RecoverConsume(true);
                    break;
                  End;
-                oper.opr.Ref.Offset:=BuildConstExpression(false,true);
-                hasimm:=true;
+                if actasmtoken=AS_PLUS then
+                  Consume(AS_PLUS);
+                if (actasmtoken=AS_INTNUM) then
+                  begin
+                    oper.opr.Ref.Offset:=BuildConstExpression(false,true);
+                    hasimm:=true;
+                  end;
               End;
 
             AS_REGISTER: