Hi,

I wanted to try some SSE2 stuff out, just integer stuff at the moment, so I put the .686 and .xmm directives at the start of my code then did the following:


.data
dqZtoF dq 0001020304050607h
dq 08090a0b0c0d0e0fh

.code
movdq xmm0,dqZtoF

but it says: "error A2008: syntax error : xmm" in reference to the "movdq" line :confused:

I got this instruction from gorilla's reference, is it not the form MASM uses? I searched on the board but found nothing useful. Also this instruction


shufps xmm0,xmm0,0

assembles ok.

btw, any quick way to define 128-bit things or is to quadwords the best way?

thanks

-stormix
Posted on 2002-12-12 07:23:47 by stormix
Now I realise I have asked the wrong question. The other SSE2 instructions are assembled but not movdq.. well now I found out that the instruction should be "movdqa" or "movdqu" but I get the same error with either of these and a similar error with movdq2q instruction :(

Can anyone help me? I've been searching again for the last hour for answers but to no avail.

-stormix
Posted on 2002-12-14 18:05:13 by stormix
I don't know what your doing wrong?! I just tried this:
_DATA SEGMENT

__xmm1 REAL4 -1.0, -0.5, 0.5, 1.0
_DATA ENDS

movupd xmm1, __xmm1
movdqa xmm1, __xmm1
No problem. Post a small snippet that exhibits your problem. There appears to be no type check on the memory locations in SSE2 instructions. MS recomends using:
movdqa xmm1, OWORD PTR __xmm1
But is doesn't seem to be needed with my version of MASM. You might want to give OWORD PTR a try. Note: you can't define data with OWORD - it puts MASM in an infinite loop! :eek: I'm using version 7.0 of ML.EXE.
Posted on 2002-12-14 21:55:09 by bitRAKE
Hi,

thanks for your comments. Before I post some code, could the problem be that i'm using ML 6.14.8444 ? I did download masmv7 from hutch's site but this is the ML that it had and the ML with msvc 6.0 is 6.11. Looks like I'll have to order the ddk?

-stormix
Posted on 2002-12-15 08:12:41 by stormix

Looks like I'll have to order the ddk?


You can download it for free from MS.
Posted on 2002-12-15 09:32:11 by bazik
Try using OWORD PTR - the MASM docs I have say it is required. Given that this syntax is inconsistant with the rest of the MASM syntax, the requirement might have been removed in the version I have? For example, the following is illegal code:
myData OWORD 08000800080008000h
But MASM does allow this with the other data types:
myData DWORD 080008000h

youData WORD 08000h
sheData BYTE 080h
Posted on 2002-12-15 11:40:31 by bitRAKE

You can download it for free from MS.


From http://www.microsoft.com/ddk/ : "We will not be offering this DDK as a download on this Web site." Is there another place I've missed?

@bitRAKE: I tried using "OWORD PTR" but to no avail. I guess this version of ml.exe that I have must not support these instructions because I get the same error as if I put e.g. "movxyz xmm0,blah" but it's weird because e.g. "movups xmm1,blah" works :(

-stormix
Posted on 2002-12-15 16:54:25 by stormix
This proc was built with ML.EXE 6.14. It does not seem to have any problems with the OWORD data type.



; ########################################################################

MemFill3 proc lpTarget:DWORD,lnth:DWORD,fillchar:DWORD

LOCAL sixteenbyte:OWORD

push esi

mov esi, lpTarget
mov ecx, lnth
shr ecx, 4 ; div by 16
mov eax, fillchar

mov DWORD PTR sixteenbyte[0], eax
mov DWORD PTR sixteenbyte[4], eax
mov DWORD PTR sixteenbyte[8], eax
mov DWORD PTR sixteenbyte[12], eax

movups xmm(0), sixteenbyte ; load xmm(0) with the 4 DWORD fill values

@@:
movntps [esi], xmm(0)
add esi, 16
dec ecx
jnz @B

pop esi

ret

MemFill3 endp

; ########################################################################

Regards,

hutch@movsd.com
Posted on 2002-12-16 16:31:44 by hutch--