formateu
formateu

Reputation: 167

Intel x86_64 Assembly add integer to double precision float SSE, SSE2

In order to achieve something like this:

for (int i=0; i < height; i++)
{
    double relY = cY-i;
    ...

L1:  
    cmp rax, [rsi]
    jz end
    mov xmm2, rax ;<----
    ...

How can I move 32bit int to double precision float register ? Is it possible?

Upvotes: 0

Views: 614

Answers (1)

formateu
formateu

Reputation: 167

According to what Michael Petch wrote in his comment: the instruction is CVTSI2SD:

cvtsi2sd xmm2, rax

Upvotes: 0

Related Questions