fix single and double result in fpc x64 linux (replace movd by movq)

This commit is contained in:
marius maximus 2015-12-12 22:50:57 +01:00
parent 2fdeb7ee7d
commit 1cf322d8c6

View File

@ -307,21 +307,22 @@ asm
// add RSP, 32 // undo the damage done earlier // add RSP, 32 // undo the damage done earlier
// copy result back // copy result back
mov rsi, [rbp-16] mov rsi, [rbp-16] // _RAX parameter
mov [rsi], RAX mov [rsi], RAX
mov rsi, [rbp-24] mov rsi, [rbp-24] // _XMM0 parameter
// xmm0 res // xmm0 res
mov rax, [rbp-32] mov rax, [rbp-32] // Registers parameter
bt [rax+104], 8 bt [rax+104], 8 // if atype.basetype <> btSingle
jnc @skipres jnc @skipres // then goto skipres else begin
cvtss2sd xmm1,xmm0 cvtss2sd xmm1,xmm0 // convert single to double into xmm1
movd [rsi],xmm1 movq [rsi],xmm1 // move quadword to _XMM0
jmp @skipresre jmp @skipresre // end
@skipres: @skipres:
movd [rsi],xmm0 movq [rsi],xmm0 // move quadword to _XMM0
@skipresre: @skipresre:
pop rdx pop rdx
pop r9 // xmm0 pop r9 // xmm0
pop rsi // _rax pop rsi // _rax