diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 22:19:00 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 22:19:00 +0000 |
commit | 2dbbc1b4fcbab6c121fc4fe885002ca471b31a26 (patch) | |
tree | 5534d2f84cad3d5dd29facba6efbae561a00f73f | |
parent | 4cc098fb5e0a0f97e6b91415ac363ede65e45720 (diff) | |
download | fpc-2dbbc1b4fcbab6c121fc4fe885002ca471b31a26.tar.gz |
* RiscV32: properly read references with record offsets and base register
+ RiscV32: sanity check in assembler writer
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48892 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/riscv/agrvgas.pas | 4 | ||||
-rw-r--r-- | compiler/riscv32/rarv32gas.pas | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/compiler/riscv/agrvgas.pas b/compiler/riscv/agrvgas.pas index 4ed6c30e82..a71a06aa74 100644 --- a/compiler/riscv/agrvgas.pas +++ b/compiler/riscv/agrvgas.pas @@ -130,7 +130,9 @@ unit agrvgas; s:=s+gas_regname(base)+','+gas_regname(index) else internalerror(2006052502); - end; + end + else + Internalerror(2021030602); case refaddr of addr_lo12: s:='%lo'+s; diff --git a/compiler/riscv32/rarv32gas.pas b/compiler/riscv32/rarv32gas.pas index dc8c0fbd4d..3689c3b9a6 100644 --- a/compiler/riscv32/rarv32gas.pas +++ b/compiler/riscv32/rarv32gas.pas @@ -533,7 +533,10 @@ Unit rarv32gas; end; { Do we have a indexing reference, then parse it also } if actasmtoken=AS_LPAREN then - BuildReference(oper); + begin + oper.InitRef; + BuildReference(oper); + end; end; AS_REGISTER: { Register, a variable reference or a constant reference } |