Recent

Author Topic: CVTSD2SS weird memory operand discrimination  (Read 616 times)

Madoc

  • Jr. Member
  • **
  • Posts: 52
CVTSD2SS weird memory operand discrimination
« on: July 01, 2024, 08:15:27 pm »
None of these asm lines will compile:

Code: Pascal  [Select][+][-]
  1. procedure foo(const a: double);
  2. asm
  3.    cvtsd2ss xmm0, [a]
  4.  
  5.    cvtsd2ss xmm0, qword [rcx]
  6.  
  7.    cvtsd2ss xmm0, qword ptr [rcx]

With errors that seem to vary depending on the type of a, including:

Error: Asm: [cvtsd2ss reg??,mem128] invalid combination of opcode and operands

These however work just fine:
Code: Pascal  [Select][+][-]
  1.   cvtsd2ss xmm0, [rcx]
  2.  
  3.   movq     xmm0, [a]
  4.   cvtsd2ss xmm0, xmm0

 cvtpd2ps works just fine in all cases, as well as all other instructions I've used so far.

 

TinyPortal © 2005-2018