News:

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

how to support sse2 ?

Started by carl, December 12, 2006, 05:51:15 AM

Previous topic - Next topic

carl

Dear All:

I'm a starter with Masm .I want to use sse2 to optimize some procedure.but now some trouble is taken to me.
could someone help me ? thanks

the code is followed:
#####################################
.686p
.xmm
.model flat, stdcall
option casemap :none
.code

myasmproc proc dw1:DWORD,dw2:DWORD

push ebx;
push ebp;
mov ebp,esp;

mov eax,dw1
......
movapd xmm0,[eax];
xorpd xmm1,xmm1;
addpd xmm1,xmm0;
......
mov  esp,ebp;
pop  ebp;
pop  ebx;

ret
myasmproc endp
end
##########################

myasm.asm(17) : error A2006: undefined symbol : xmm0
myasm.asm(18) : error A2006: undefined symbol : xmm0
myasm.asm(19) : error A2006: undefined symbol : xmm1

Draakie

What Masm/Link version are you running ?
Does this code make me look bloated ? (wink)


hutch--

Carl,

Two things, the version of ML.EXE in the masm32 project is not late enough to do sse2. You need ML 6.15 to do that. various sources for a later version, if you own the old VC6, get the processor pack on the forum web site, otherwise and late DDK or use the VC and MASM link above to do the big install of VC2005 and add the latest version of ML to it, version 8.00.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dsouza123

The placement of .xmm makes a difference.

Once you are using a version of ML that supports the SSE2 instructions,
use the following order and then the case of xmm0 doesn't matter,
either all upper, XMM0 or all lower, xmm0 will work.

.686p
.model flat,stdcall
option casemap:none
.xmm

carl

thanks Draakie, hutch--, dsouza123

I use the order which dsouza123 said ,and  all is ok.

thank you.