#1 2020-07-15 23:46:59

Hafedh TRIMECHE
Member
Registered: 2016-09-18
Posts: 37

FPC 3.3.1 Compiler Error Syncommons

mORMot: SVN 9577
FPC: 3.3.1
SynCommons.pas(24987,19) Error: Assembler syntax error

{$ifdef FPC} nostackframe; assembler; asm {$else} asm .noframe {$endif FPC}
        {$ifndef win64}
        mov     r8d, len
        {$endif}
        mov     eax, crc
        xor     ecx, ecx
        test    buf, buf // buf=rdx/rsi len=r8
        jz      @z
        neg     r8
        jz      @z
        not     eax
        lea     r9, [rip + crc32ctab]
        cmp     r8, -8
        jb      @head
@sml:   mov     cl, byte ptr[buf]
        inc     buf
        xor     cl, al

Offline

#2 2020-07-16 07:45:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: FPC 3.3.1 Compiler Error Syncommons

I don't know what mORMot SVN 9577 means, since it it available on Git and Fossil only.
Current mORMot revision is 1.18.6089.

cmp r8,-8

is a perfectly valid instruction.

So this seems to be a bug of the FPC trunk.

Please use the recommended FPC 3.2 revision.

Offline

#3 2020-07-16 08:14:37

Hafedh TRIMECHE
Member
Registered: 2016-09-18
Posts: 37

Re: FPC 3.3.1 Compiler Error Syncommons

Please note this repository : https://github.com/synopse/mORMot

Code is checked out  using https://github.com/synopse/mORMot.git/trunk and TortoiseSVN giving 9577 as revision.

I'll try FPC 3.2.

Best regards.

Offline

#4 2020-07-16 08:50:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: FPC 3.3.1 Compiler Error Syncommons

Tortoise SVN is for SVN, not for git.... and there is no revision in git, just a SHA hash of any commit.
So Tortoise is creating a fake revision. Don't use this number, which doesn't mean anything (there is 7203 git commits in fact).

The mORMot revision is stored in https://github.com/synopse/mORMot/blob/ … Commit.inc

Offline

#5 2020-07-16 13:33:39

Hafedh TRIMECHE
Member
Registered: 2016-09-18
Posts: 37

Re: FPC 3.3.1 Compiler Error Syncommons

Please not that the problem persisted with:
Lazarus: 2.0.10
FPC: 3.2.0

SynCommons.pas(24977,17) Error: Unknown identifier "R8D"

Last edited by Hafedh TRIMECHE (2020-07-16 13:34:41)

Offline

#6 2020-07-16 14:55:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: FPC 3.3.1 Compiler Error Syncommons

There is clearly something wrong with your setup.
I don't have any problem with Lazarus 2.0.10 and FPC 3.2.0.

Compile Project, Mode: lin64, Target: fpc/bin/x86_64-linux/TestSQL3: Success
Verbose: Free Pascal Compiler version 3.2.0-r45643 [2020/07/16] for x86_64
Verbose: Copyright (c) 1993-2020 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compiling TestSQL3.dpr
Verbose: Linking /home/ab/dev/lib/SQLite3/fpc/bin/x86_64-linux/TestSQL3
Verbose: 981 lines compiled, 1.4 sec

Please check your source code, especially that there is no confusion with Synopse.inc.

Offline

Board footer

Powered by FluxBB