BGRABitmap cross compiling to OpenBSD i386 shows the Asm error
FPC 3.2-fixes installed with FPCupdeluxe 2.4.0a, with OpenBSD i386 cross compiler. Ubuntu 20.04.
BGRABitmap: take the component version 11.5.5, from GitHub, https://github.com/bgrabitmap/bgrabitmap/releases . I got errors:
Verbose: 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
error line 442 in mentioned .s file is:
imul (%esi)
and the Pascal code has these ASM constructs, with imul [esi]:
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]
Developer 'marcov' told me in the forum:
these are from the assembler. some clang-as problem, probably. ........ 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.
Edited by Alexey Torgashin