AArch64 assembler error in fcl-web under -O4 -CriotR
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
When the trunk is built under the options "-O4 -CriotR", an assembler error is generated:
...
Writing Resource String Table file: fpweb.rsj
Assembling fpweb
Assembling webpage
Writing Resource String Table file: fphtml.rsj
Assembling fphtml
Compiling ./fcl-web/src/base/fpdatasetform.pp
Assembling fpdatasetform
fpdatasetform.pp(1281) Error: Error while assembling exitcode 1
fpdatasetform.pp(1281) Fatal: There were 2 errors compiling module, stopping
fcl-web/units/aarch64-linux/fpdatasetform.s: Assembler messages:
fcl-web/units/aarch64-linux/fpdatasetform.s:2598: Error: missing extend operator at operand 3 -- `adds x19,x0,w1'
Fatal: Compilation aborted
This error also occurs if -OoNOPEEPHOLE is specified, indicating that the bug is not located in the Peephole Optimizerr.
Steps to reproduce:
Build the trunk under an aarch64-linux platform OPT="-O4 -CriotR" (and -a if you want the assembly dumps) and observe the error when attempting to build the fcl-web package.
Additional information:
The culprit block of code in "fcl-web/units/aarch64-linux/fpdatasetform.s" is as follows (this block isn't modified by the Peephole Optimizer and appears the same under -OoNOPEEPHOLE):
.Lj361:
movz w23,1
sxtw x0,w22
ldr w1,[x26, 372]
adds x19,x0,w1 <=== Erroneous instruction
b.vc .Lj368
bl FPC_OVERFLOW
.Lj368:
Mantis conversion info:
- Mantis ID: 38840
- OS: Debian GNU/Linux (Raspberry Pi)
- OS Build: 10
- Build: r49298
- Platform: aarch64-linux
- Version: 3.3.1