Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2020-04

Cannot compile fpc with latest trunk on MacOSX

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Ring

make -j clean buildbase FPC=~/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh

works fine with fpc checkout from a few days ago, with todays trunk I get the following error:

/Library/Developer/CommandLineTools/usr/bin/make rtl /Library/Developer/CommandLineTools/usr/bin/make -C /Users/ring/devel/fpc/rtl 'OPT=   ' all
/Library/Developer/CommandLineTools/usr/bin/make -C darwin all /Users/ring/devel/fpc/compiler/ppc1 -Ur -dFPC_USE_LIBC -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fi../bsd -Fi../bsd/x86_64 -Fi../darwin/x86_64 -FE.
-FU/Users/ring/devel/fpc/rtl/units/x86_64-darwin -dx86_64 -dRELEASE  -Us -Sg ../bsd/system.pp
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:3469:15: error: invalid operand for instruction
        movzbl  %r12b,%rdx
                      ^~~~
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:8698:16: error: invalid operand for instruction
        movzbl  (%r14),%r13
                       ^~~~
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:24549:15: error: invalid operand for instruction
        movzbl  %r12b,%r15
                      ^~~~
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:24557:15: error: invalid operand for instruction
        movzbl  %r12b,%r15
                      ^~~~
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:24801:15: error: invalid operand for instruction
        movzbl  %r12b,%r15
                      ^~~~
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:24807:15: error: invalid operand for instruction
        movzbl  %r12b,%r15
                      ^~~~
system.pp(398) Error: Error while assembling exitcode 1 system.pp(398) Fatal: There were 2 errors compiling module, stopping

Reply by email

J. Gareth Moreton

This has probably already been identified,
but %r15 etc should be %r15d. You can't zero-
extend directly to a 64-bit register because
zero-extending to 32-bit is guaranteed to
zero the upper 32 bits.

Gareth aka. Kit

On Sat 25/04/20 18:00 , "Jonas Maebe"
sent:

On 25/04/2020 16:46, Michael Ring via fpc-
devel wrote 5 lines
> /Users/ring/devel/fpc/rtl/units/x86_64-

darwin/system.s:3469:15: error:

Show quoted text 10 lines
> invalid operand for instruction >         movzbl  %r12b,%rdx >             &nb sp;         ^~~~ Probably caused by r45057. It would be nice

if the internal assembler

were more rigorous in its checks, so it

would catch these errors too.

Show quoted text 8 lines
Jonas

Reply by email

Jonas Maebe
to Michael Ring: make -j clean buildbase FPC=~/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh works fine with…
Michael Ring wrote
/Users/ring/devel/fpc/rtl/units/x86_64-darwin/system.s:3469:15: error: invalid operand for instruction         movzbl  %r12b,%rdx                       ^~~~

Probably caused by r45057. It would be nice if the internal assembler were more rigorous in its checks, so it would catch these errors too.

Jonas

Reply by email