Bug ? [vsqrtss xmmreg,xmmreg,mem128] invalid combination of opcode and operand lazarus / 64-FPC development ---------------------------------------------------------------------- Nitorami · 2018-07-11 16:47 I get an error message on compiling this bit of code. Windows10 & 7, FPC 3.0.4.  Can anybody test and confirm this please ? Seems to be a problem with AVX instruction set and optimisation for register variables. CPU-Z reports that my machine supports the AVX instruction set, so I suspect this is a bug. Compile with: fpc mist.pas -CfSSE2 -CpCOREAVX -Mobjfpc -O2 -Twin32 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 //fpc mist.pas -CfSSE2 -CpCOREAVX -Mobjfpc -O2 -Twin32 type float = single;     TVector = array of float;     TMatrix = array of TVector;  function mtx_cholesky (const a:TMatrix):TMatrix;var l : TMatrix;    c : float;begin  c := 3;  c := sqrt(c); //-> invalid combination of opcode and operand  SetLength (l,3,3);  l[0,0]:=c;  result:=l;end; beginend. ---------------------------------------------------------------------- ASerge · 2018-07-11 17:54 Confirm. It is interesting that if you add the generation of asm code (-al), then everything passes. Code: ASM  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...# [12] c := 3;        vmovss  _$PROGRAM$_Ld1,%xmm0        movss   %xmm0,-56(%ebp)# [13] c := sqrt(c); //-> invalid combination of opcode and operand        vsqrtss -56(%ebp),%xmm0,%xmm0        vmovss  %xmm0,-56(%ebp)... ---------------------------------------------------------------------- Nitorami · 2018-07-11 19:16 Indeed, very odd. I will file a bug report. ---------------------------------------------------------------------- marcov · 2018-07-11 20:38 Did you try -CfAVX ? Seems a bit strange to allow AVX instructions, but not for the CPU? ---------------------------------------------------------------------- Nitorami · 2018-07-11 21:07 Yes, same behaviour.