View Issue Details

IDProjectCategoryView StatusLast Update
0038840FPCCompilerpublic2021-05-01 23:38
ReporterJ. Gareth Moreton Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformaarch64-linuxOSDebian GNU/Linux (Raspberry Pi) 
Product Version3.3.1 
Summary0038840: AArch64 assembler error in fcl-web under -O4 -CriotR
DescriptionWhen 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 ReproduceBuild 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 InformationThe 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:
Tagsaarch64, assembler, compiler
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-05-01 23:37 J. Gareth Moreton New Issue
2021-05-01 23:37 J. Gareth Moreton Tag Attached: aarch64
2021-05-01 23:37 J. Gareth Moreton Tag Attached: compiler
2021-05-01 23:37 J. Gareth Moreton Tag Attached: assembler
2021-05-01 23:38 J. Gareth Moreton Additional Information Updated View Revisions
2021-05-01 23:38 J. Gareth Moreton FPCTarget => -