Recent

Author Topic: FPC Assembler memory operand size is 64 bits, but expected 128 bits  (Read 1553 times)

mikerabat

  • New Member
  • *
  • Posts: 39
Hey guys!

Again some strange compiler warnings (though this time without consequences...) which I cannot figure
out, so I hope someone can help me here.

These are the first few lines of code in  matrix vector multiplication x64 assembler code section:

Code: [Select]
procedure ASMMatrixVectMultT(dest : PDouble; destLineWidth : TASMNativeInt; mt1, v : PDouble; LineWidthMT, LineWidthV : TASMNativeInt; width, height : TASMNativeInt; alpha, beta : double);
var dXMM4, dXMM5, dXMM6, dXMM7 : Array[0..1] of double;
    iRBX, iRSI, iRDI, iR12, iR13, iR14 : TASMNativeInt;

    res0, res1, res2, res3,
    res4, res5, res6, res7 : Array[0..1] of  double;
{$IFDEF FPC}
begin
{$ENDIF}
asm
   // prolog - simulate stack
   mov iRBX, rbx;
   mov iRSI, rsi;
   mov iRDI, rdi;
   mov iR12, r12;
   mov iR13, r13;
   mov iR14, r14;

   movupd dXMM4, xmm4;
   movupd dXMM5, xmm5;
   movupd dXMM6, xmm6;
   movupd dXMM7, xmm7;


   // for the final multiplication
   movddup xmm6, alpha;  // here and in the next line the warnings occure:
   movddup xmm7, beta;


So the movddup lines cause the warning:

"Warning: Check size of memory operand "movddup: memory-operand-size is 64 bits, but expected [128 bits]"

The warning itself is quite strange since the movddup instruction only uses 64 bit memory size operands and
the variables are part of the function call (so they reside on the stack).

Anyone knows how to fix the warning?
Note that output program works but there is always a bad taste if the compiler issues a warning....

I'm using FPC V 3.1.1...

 

TinyPortal © 2005-2018