View Issue Details

IDProjectCategoryView StatusLast Update
0013808FPCCompilerpublic2009-05-24 17:08
ReporterliangbyAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version2.2.2Product Build 
Target VersionFixed in Version 
Summary0013808: ARM code generator does not handle unaligned accesses to FPA floating point data
DescriptionI try compile lazreport in lazarus 0.9.26.2 for arm-linux, but ppcrossarm could not generate correct assemble code:
if (Param.cAngle = 90) or (Param.cAngle = 270) then
        ldr r0,[r11, #-48]
        # Register r0 released
        # Register f0 allocated
        
        ldfd f0,[r0, 0000235]

        # Register r0 allocated
...
Error is : lib/lazreport/arm-linux/lr_barc.s:2799: Error: co-processor address must be word aligned -- `ldfd f0,[r0,0000235]'

command line is ::ppcrossarm -alr -B -MObjFPC -Scgi -O1 -gl -vewnhi -l -Fu/usr/lib64/lazarus/ideintf/units/arm-linux/ -Fu/home/lby/.lazarus/lib/Printer4Lazarus/arm-linux/ -Fu/usr/lib64/lazarus/components/synedit/units/arm-linux/ -Fu/usr/lib64/lazarus/lcl/units/arm-linux/ -Fu/usr/lib64/lazarus/lcl/units/arm-linux/gtk/ -Fu/usr/lib64/lazarus/packager/units/arm-linux/ -Fu/usr/lib64/lazarus/components/lazreport/source/ -Fu. -FU/home/lby/.lazarus/lib/lazreport/arm-linux/ -dLCL -dLCLgtk /usr/lib64/lazarus/components/lazreport/source/lr_barc.pas
TagsNo tags attached.
Fixed in Revision
FPCOldBugId0
FPCTarget
Attached Files

Activities

2009-05-24 12:16

 

lr_barc.s.gz (85,163 bytes)

Jonas Maebe

2009-05-24 12:51

manager   ~0027910

This bug has probably been fixed in FPC 2.2.4, and certainly in 2.3.1. Unfortunately, it appears that there is no binary downloadable version for ARM/Linux of 2.2.4, so you will have to build it yourself. See http://www.stack.nl/~marcov/buildfaq.pdf for some information about how to do that.

Note that if you need ARM eabi support, then you definitely have to build 2.3.1 (the current svn development version) from source, because earlier versions contained many bugs in the eabi support. See http://www.freepascal.org/develop.var for information about how to download the source code from svn.

Should you have problems building everything afterwards, please use the mailing lists to ask for help rather than the bug reporting form.

liangby

2009-05-24 16:48

reporter   ~0027923

The same error is occured if use fpc 2.2.4:
# [327] if (Param.cAngle = 90) or (Param.cAngle = 270) then
        ldr r0,[r11, #-48]
        # Register r0 released
        # Register f0 allocated
        ldfd f0,[r0, 0000235]

Jonas Maebe

2009-05-24 16:58

manager   ~0027925

Then please try 2.3.1. Alignment handling has been completely reworked there.

Jonas Maebe

2009-05-24 16:59

manager   ~0027926

Actually, it may still fail there, because the problem may be specific to the floating point code. Try compiling with -Cfsoft to use softfloat instead.

Jonas Maebe

2009-05-24 17:07

manager   ~0027927

You could also try adding {$z1} to /usr/lib64/lazarus/components/lazreport/source/barcode.pas (right after the uses clause in the interface). Then the cRatio and cAngle fields of TfrBarCode will no longer be unaligned.

Of course, it should also work otherwise, but currently those fields are extremely slow to access on any cpu.

Issue History

Date Modified Username Field Change
2009-05-24 12:16 liangby New Issue
2009-05-24 12:16 liangby File Added: lr_barc.s.gz
2009-05-24 12:51 Jonas Maebe Status new => resolved
2009-05-24 12:51 Jonas Maebe Resolution open => fixed
2009-05-24 12:51 Jonas Maebe Assigned To => Jonas Maebe
2009-05-24 12:51 Jonas Maebe Note Added: 0027910
2009-05-24 16:48 liangby Status resolved => feedback
2009-05-24 16:48 liangby Resolution fixed => reopened
2009-05-24 16:48 liangby Note Added: 0027923
2009-05-24 16:58 Jonas Maebe Status feedback => resolved
2009-05-24 16:58 Jonas Maebe Resolution reopened => fixed
2009-05-24 16:58 Jonas Maebe Note Added: 0027925
2009-05-24 16:59 Jonas Maebe Note Added: 0027926
2009-05-24 17:07 Jonas Maebe Note Added: 0027927
2009-05-24 17:08 Jonas Maebe FPCOldBugId => 0
2009-05-24 17:08 Jonas Maebe Assigned To Jonas Maebe =>
2009-05-24 17:08 Jonas Maebe Status resolved => acknowledged
2009-05-24 17:08 Jonas Maebe Resolution fixed => open
2009-05-24 17:08 Jonas Maebe Summary ppcrossarm could not generate correct assemble code => ARM code generator does no handle unaligned accesses to floating point data
2009-05-24 17:08 Jonas Maebe Summary ARM code generator does no handle unaligned accesses to floating point data => ARM code generator does not handle unaligned accesses to FPA floating point data