News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

SSE problems with MASM 10?

Started by liamo1, September 01, 2010, 08:21:59 PM

Previous topic - Next topic

liamo1

I get the error

error A2070:invalid instruction operands

on the following line of code

movsd   xmm1, [edi] ;copy edi into xmm1. high quadword is zeroed out.

It compiled ok with previous versions of ml. Just wondering if anyone else came across this?

Liam

clive

If in doubt, use the linker for MASM 10.00 to disassemble your earlier code. LINK -dump -disasm FOO.EXE

Microsoft (R) Macro Assembler Version 10.00.30319.01     09/01/10 16:01:24
test44.asm      Page 1 - 1


        .686
        .XMM
        .MODEL FLAT

00000000         .CODE

00000000 _start:

00000000  F2/ 0F 10 0F         movsd   xmm1, mmword ptr [edi]
00000004  F2/ 0F 11 33         movsd   mmword ptr [ebx], xmm6

00000008  C3         ret

        END     _start
It could be a random act of randomness. Those happen a lot as well.

jj2007

Your options:
movlps xmm0, qword ptr [edi] ; does not clear the high quadword
movsd xmm1, qword ptr [edi] ; chokes with ML 6.15
movq xmm2, qword ptr [edi] ; does clear the high quadword


liamo1

Just an update. Thanks to jj2007 I used the qword ptr prefix on [edi] and it worked with both movsd and movq. movapd did not throw this error!

Thanks
Liam

Rockoon

When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.