Explorar el Código

* correctly handle local reference in the RISC V assembler readers (both 32 and 64 bit)

git-svn-id: trunk@43790 -
svenbarth hace 5 años
padre
commit
f59eae4f81
Se han modificado 2 ficheros con 10 adiciones y 2 borrados
  1. 5 1
      compiler/riscv32/rarv32gas.pas
  2. 5 1
      compiler/riscv64/rarv64gas.pas

+ 5 - 1
compiler/riscv32/rarv32gas.pas

@@ -568,7 +568,11 @@ Unit rarv32gas;
 
             oper.opr.ref.refaddr:=refaddr;
             Consume(AS_RPAREN);
-          end;
+          end
+        else if (oper.opr.typ=OPR_REFERENCE) and
+           (oper.opr.ref.refaddr=addr_no) and
+           assigned(oper.opr.ref.symbol) then
+          oper.opr.ref.refaddr:=addr_full;
       end;
 
 

+ 5 - 1
compiler/riscv64/rarv64gas.pas

@@ -609,7 +609,11 @@ unit rarv64gas;
 
             oper.opr.ref.refaddr:=refaddr;
             Consume(AS_RPAREN);
-          end;
+          end
+        else if (oper.opr.typ=OPR_REFERENCE) and
+           (oper.opr.ref.refaddr=addr_no) and
+           assigned(oper.opr.ref.symbol) then
+          oper.opr.ref.refaddr:=addr_full;
       end;