Asm errors when compiling BGRABitmap for OpenBSD i386 lazarus / 68-Other OS ---------------------------------------------------------------------- AlexTP · 2023-08-13 16:05 QuoteVerbose: Assembling bgraanimatedgif Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s: Assembler messages: Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:442: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:460: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:478: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:496: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:699: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:732: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:765: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:798: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Verbose: Compiling bgracolorint.pas Verbose: Assembling bgracolorint bgracolorint.pas(364,0) Error: Error while assembling exitcode 1 bgracolorint.pas(364,0) Verbose: There were 2 errors compiling module, stopping Verbose: Compilation aborted Verbose: /home/user/fpcupdeluxe/fpcupdeluxe32/fpc/bin/x86_64-linux/ppcross386 returned an error exitcode FPC 3.2-fixes. Ubuntu 20.04 x64, cross compiling for OpenBSD i386. Lazarus 3.99. aren't these FPC bugs? ---------------------------------------------------------------------- AlexTP · 2023-08-13 16:26 Error: /home/user/cuda/bgrabitmap/bgrabitmap/lib/i386-openbsd- gtk2-3.2.3/bgracolorint.s:442: Error: no instruction mnemonic suffix given and no register operands; can't size instruction line 442 in .s file is: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         imul    (%esi) ---------------------------------------------------------------------- marcov · 2023-08-14 06:51 No these are from the assembler. some clang-as problem, probably. ---------------------------------------------------------------------- AlexTP · 2023-08-15 08:17 Yes, OpenBSD has the little different assembler program, as noted on the Github issue. ---------------------------------------------------------------------- marcov · 2023-08-15 08:56 The error message looks sane  the imul has no suffix (like imull to indicate 32-bit or -q for 64-bit). It wouldn't be a bad thing if FPC generated slightly stricter, so might be worth a bugreport ---------------------------------------------------------------------- AlexTP · 2023-08-15 09:30 No,  the reason is code in bgracolorint.pas: it has the 'imul'. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i operator*(const color1, color2: TColorInt65536): TColorInt65536;{$ifdef BGRACOLORINT_USEASM} {$asmmode intel} assembler;  asm    push edx    push ebx    push esi    mov ebx, Color1    mov esi, Color2    //ecx = @result     mov eax, [ebx] //r  imul [esi] ---------------------------------------------------------------------- marcov · 2023-08-15 09:55 Yeah, but in intel mode.  ATT and Intel mode are parsed and then reassembled for assembler output again (which is why you can use pascal identifiers!) So it is still a bug in the ATT output IMHO ---------------------------------------------------------------------- AlexTP · 2023-08-15 10:27 Posted issue to https://gitlab.com/freepascal.org/fpc/source/-/issues/40399