Skip to content

fpc-2.6.0 package broken because of vfp-instructions #63

@masta79

Description

@masta79

While trying to build the current fpc trunk I get the following error when I use the provided FPC as a bootstrap compiler:

/usr/bin/ppcarm -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/pi/projects/freepascal/rtl/units/arm-linux -dFPC_ARMEL -Fd -O3 -dFPC_ABI_EABI -CpARMV5 -gl -a -al -an -ar -at -darm -dRELEASE -Us -Sg system.pp
Fatal: Compilation aborted
An unhandled exception occurred at $0011AC8C :
EInvalidOp : Invalid floating point operation
$0011AC8C FACTOR, line 2573 of pexpr.pas
$0011E1B4 SUB_EXPR, line 2855 of pexpr.pas
$0011E1D4 SUB_EXPR, line 2857 of pexpr.pas
$0011E1D4 SUB_EXPR, line 2857 of pexpr.pas
$0011E1D4 SUB_EXPR, line 2857 of pexpr.pas
$0011E760 COMP_EXPR, line 2946 of pexpr.pas
$0010B638 CONSTS_DEC, line 196 of pdecl.pas
$0010B588 CONST_DEC, line 167 of pdecl.pas
$0010520C READ_PROC, line 1752 of psub.pas
$00105754 READ_DECLARATIONS, line 1876 of psub.pas
$00139D4C COMPILE, line 396 of parser.pas
$0001E050 COMPILE, line 252 of compiler.pas

The assembly in question is:
11ac84: 1a00000d bne 11acc0 <PEXPR_FACTOR$BOOLEAN$BOOLEAN$$TNODE+0xd74>
11ac88: eeb70bc8 vcvt.f32.f64 s0, d8
11ac8c: eeb70ac0 vcvt.f64.f32 d0, s0 <<<<<---------- Error
11ac90: eeb48b40 vcmp.f64 d8, d0
11ac94: eef1fa10 vmrs APSR_nzcv, fpscr

From the documentation I've read so far there should be no reason for this to fail. At least arm says that this instruction is supported in vfp2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions