Forum > General

CVTSD2SS weird memory operand discrimination

(1/1)

Madoc:
None of these asm lines will compile:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure foo(const a: double);asm   cvtsd2ss xmm0, [a]    cvtsd2ss xmm0, qword [rcx]    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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  cvtsd2ss xmm0, [rcx]   movq     xmm0, [a]  cvtsd2ss xmm0, xmm0
 cvtpd2ps works just fine in all cases, as well as all other instructions I've used so far.

Navigation

[0] Message Index

Go to full version