Recent

Author Topic: VBROADCASTSS  (Read 1288 times)

SonnyBoyXXl

  • Jr. Member
  • **
  • Posts: 56
VBROADCASTSS
« on: November 02, 2021, 11:26:11 pm »
I declare this function
Code: Pascal  [Select][+][-]
  1. {$IF defined(_XM_AVX_INTRINSICS_)}
  2. function XMVectorReplicate(constref Value: single): TXMVECTOR; assembler; nostackframe;
  3. asm
  4.            VBROADCASTSS XMM0,[Value]
  5.            VMOVUPS  [Result],XMM0
  6. end;
  7. {$ELSE}
But I get this error DirectX.Math.pas(1880,12) Error: Asm: [vbroadcastss xmmreg0,mem128] invalid combination of opcode and operands.
 But refering to here https://www.felixcloutier.com/x86/vbroadcast this opcode should be possible.

SonnyBoyXXl

  • Jr. Member
  • **
  • Posts: 56
Re: VBROADCASTSS
« Reply #1 on: November 02, 2021, 11:30:28 pm »
It works now. no idea why, but it works  8-)

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: vbroadcastss
« Reply #2 on: November 04, 2021, 02:19:12 pm »
But I get this error DirectX.Math.pas(1880,12) Error: Asm: [vbroadcastss xmmreg0,mem128] invalid combination of opcode and operands.
 But refering to here https://www.felixcloutier.com/x86/vbroadcast this opcode should be possible.
No, the error message is correct. This combination is not possible.
It works now. no idea why, but it works  8-)
I experienced the same bug: I could compile it by kicking the FPC in the butt “Hey, this is a pSingle!”
Code: ASM  [Select][+][-]
  1.         vbroadcastss xmm0, single ptr [value]
Yours Sincerely
Kai Burghardt

 

TinyPortal © 2005-2018