View Issue Details

IDProjectCategoryView StatusLast Update
0036986FPCCompilerpublic2020-04-28 18:49
ReporterKlaus1 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0036986: error and warnings in inline assembler
Descriptionsee file with coding
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Klaus1

2020-04-28 17:15

reporter  

Errormessages_FP32_Rc1.txt (1,726 bytes)   
Follow error have seen: (assembermode Intel)

I wondered that errors here but not in FPC 304. Have you a new parser?

function SetYValueDouble (Feld :pTYDouble; Dim :TRDim; constref Value :Double):Longbool;
  assembler;nostackframe;

asm
  mov r10d,Dim;
  call TESTQWORD_1;
  jz  @ende;
  vbroadcastsd ymm0,qword ptr[Value];     here invalid combination of opcode and operands

function OrYDouble (Feld :pTYDouble; Mask :T4QWord):T4Double;assembler;nostackframe;
 asm
  vmovapd ymm0,ymmword ptr [Feld];
  vorpd ymm0,ymm1,ymmword ptr [Mask]       dito

function AddXValueByteSat (Feld :pTXByte; Dim :TRDim; Value :Byte):Longbool;
         assembler;nostackframe;
 asm
  mov  r10d,Dim;
  call TESTBYTE_1;
  jz @ende;
  movzx r11d,Value;             this error is equal for movsx  
  
function ConvertXInt32ToDouble (Feld :pT4Int32):T2Double;assembler;nostackframe;
 asm
  cvtdq2pd xmm0,xmmword ptr [Feld];
  movups xmmword ptr [Result],xmm0;
end;                                    
  
function ConvertXSingleToDouble (Feld :pT2Single):T2Double;assembler;nostackframe;
 asm
  cvtps2pd xmm0,xmmword ptr [Feld];
  movdqu xmmword ptr [Result],xmm0;
end;  

                                     
follow warnings

function SetXValueQWord (Feld :pTXQWord; Dim :TRDim; constref Value :QWord):Longbool;
  assembler;nostackframe;

asm
  mov r10d,Dim;
  call TESTQWORD_1;
  jz @ende;
  movq xmm0,qword ptr [Value];      memory operand size is 64 bits, but expected 128 bits
  
 movsd  xmm1,qword ptr[exponent];  -> equal warning
 
 I think the parser has problems with orders of defined value.
 movq will have a size of qword
 movsd will have a double

 when I use vmovq   -> error!
Errormessages_FP32_Rc1.txt (1,726 bytes)   

Klaus1

2020-04-28 18:49

reporter   ~0122507

please see the file errormessages_fp32_rc1_errata.txt in the primary file is are errors . pardon regards Klaus
Errormessages_FP32_Rc1_errata.txt (2,327 bytes)   
Follow error have seen: (assembermode Intel)

I wondered that errors here but not in FPC 304. Have you a new parser?

function SetYValueDouble (Feld :pTYDouble; Dim :TRDim; constref Value :Double):Longbool;
  assembler;nostackframe;

asm
  mov r10d,Dim;
  call TESTQWORD_1;
  jz  @ende;
  vbroadcastsd ymm0,qword ptr[Value];     here invalid combination of opcode and operands

function OrYDouble (Feld :pTYDouble; Mask :T4QWord):T4Double;assembler;nostackframe;
 asm
  vmovapd ymm0,ymmword ptr [Feld];
  vorpd ymm0,ymm1,ymmword ptr [Mask]       dito

function AddXValueByteSat (Feld :pTXByte; Dim :TRDim; Value :Byte):Longbool;
         assembler;nostackframe;
 asm
  mov  r10d,Dim;
  call TESTBYTE_1;
  jz @ende;
  movzx r11d,Value;             this error is equal for movsx  

in fpc 3.04 this funzt  
function ConvertXInt32ToDouble (Feld :pT2Int32):T2Double;assembler;nostackframe;
 asm
  cvtdq2pd xmm0,[Feld];
  movups xmmword ptr [Result],xmm0;
end;         

def: pT2Int32 = pTInt32 TInt32 = packed array[0..1] of Longint
function ConvertXInt32ToDouble (Feld :pT2Int32):T2Double;assembler;nostackframe;
 asm
  cvtdq2pd xmm0,xmmword ptr [Feld];
  movups xmmword ptr [Result],xmm0;
end;                                    

in FPC3.04 this coding funzt
function ConvertXSingleToDouble (Feld :pT2Single):T2Double;assembler;nostackframe;
 asm
  cvtps2pd xmm0,[Feld];
  movdqu xmmword ptr [Result],xmm0;
end;   
 
I have it test with qword ptr -> error;  xmmword is a error only mem64 is correct
def: pT2Single = pT2Single T2Single = packed array[0..1] of Single;   
function ConvertXSingleToDouble (Feld :pT2Single):T2Double;assembler;nostackframe;
 asm
  cvtps2pd xmm0, qword ptr [Feld];
  movdqu xmmword ptr [Result],xmm0;
end;  

                                     
follow warnings

function SetXValueQWord (Feld :pTXQWord; Dim :TRDim; constref Value :QWord):Longbool;
  assembler;nostackframe;

asm
  mov r10d,Dim;
  call TESTQWORD_1;
  jz @ende;
  movq xmm0,qword ptr [Value];      memory operand size is 64 bits, but expected 128 bits
  
 movsd  xmm1,qword ptr[exponent];  -> equal warning
 
 I think the parser has problems with orders of defined value.
 movq will have a size of qword
 movsd will have a double

 when I use vmovq   -> error!

Issue History

Date Modified Username Field Change
2020-04-28 17:15 Klaus1 New Issue
2020-04-28 17:15 Klaus1 File Added: Errormessages_FP32_Rc1.txt
2020-04-28 18:49 Klaus1 Note Added: 0122507
2020-04-28 18:49 Klaus1 File Added: Errormessages_FP32_Rc1_errata.txt