View Issue Details

IDProjectCategoryView StatusLast Update
0037096FPCCompilerpublic2020-05-23 14:02
ReporterKarl-Michael Schindler Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformdarwinOSMac OS X 
Product Version3.3.1 
Summary0037096: Crossbuilding the package fpc-report for the target xtensa-linux breaks
DescriptionCrossbuilding the package fpc-report for the target xtensa-linux breaks:

...
Searching file /opt/sw/bin/xtensa-linux-as... found
Using assembler: /opt/sw/bin/xtensa-linux-as
units/xtensa-linux/fpreport.s: Assembler messages:
units/xtensa-linux/fpreport.s:9933: Error: operand 2 of 'bt' has out of range value '4294966343'
fpreport.pp(12584) Error: Error while assembling exitcode 1
fpreport.pp(12584) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted

The offending line in the assembler file is:
    bt b0,.Lj1280

This is the wider context:
# [4015] w := lFC.TextWidth(s2, Font.Size);
    l32i a2,a1,12
    l32i a2,a2,176
    l32i a11,a2,24
    addi a10,a1,52
    call8 int32_to_float32
    l32i a12,a1,52
    l32i a11,a1,24
    l32i a10,a1,0
    call8 FPTTF$_$TFPFONTCACHEITEM_$__$$_TEXTWIDTH$UTF8STRING$SINGLE$$SINGLE
    s32i a10,a1,56
    lsi f0,a1,56
    ssi f0,a1,16
.Lj1281:
    lsi f0,a1,16
    lsi f1,a1,8
    olt.s b0,f1,f0
    bt b0,.Lj1280
    j .Lj1282
.Lj1282:
# [4017] if s2 <> '' then
    l32i a2,a1,24
    movi a3,0
    bne a2,a3,.Lj1332
    j .Lj1333

Some lines up there is:

.Lj1280:
# [3963] m := Length(s);
    l32i a2,a1,4
    l32i a2,a2,0
    beqz a2,.Lj1283
    addi a3,a2,-4
    l32i a2,a3,0

The corresponding source code lines are the while loop (while w > maxw do), line numbers 3961-4016 in fpreport.pp, in particular the jump back in the loop. Here, my understanding stops and i can't help any further. For example, no idea why .Lj1280 equals 4294966343.

After taking out the loop just for testing, then make all runs through.
Steps To Reproducesvn up
make all OPT="-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" CPU_TARGET=xtensa OS_TARGET=linux CROSSOPT="-O- -CaWINDOWED -Cfhard" SUBARCH=lx106
Additional InformationThe subarch does not matter; SUBARCH=lx6 gives the same. The cross-binutils have been created from scratch from the original binutils sources, version 2.34. So, there is a chance that the assembler is the problem. Maybe someone can check with binutils from Tensilica? No idea, how critical this is.

With xtensa-embedded and xtensa-freertos make all runs through. No surprise though, they do not build fcl-report.

I do not think that this matters, but for the sake of completeness:
macOS: 10.15.4
Xcode: 11.4.1
bootstrap-fpc: 3.0.4 from fink.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Karl-Michael Schindler

2020-05-23 14:02

reporter   ~0123011

As little as i understand, i thought that issue 0037121 might be related, but commit 45467 did not fix this issue.

Issue History

Date Modified Username Field Change
2020-05-17 17:57 Karl-Michael Schindler New Issue
2020-05-23 14:02 Karl-Michael Schindler Note Added: 0123011