Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

can't enable vector (SSE2) instructions

Started by gmmo1971, February 07, 2013, 08:50:08 AM

Previous topic - Next topic


Hi, I am using VS2008 MASM:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>ml.exe
Microsoft (R) Macro Assembler Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: ML [ options ] filelist [ /link linkoptions]
Run "ML /help" or "ML /?" for more info

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>

however no matter what I cannot get it to accept SSE2 instructions:

I googled around and I tried this:


but when I try to assemble this:

   movss       xmm0,dword ptr [ebx+8]

I always get this error:

1>.\weighted_avg.asm(87) : error A2085:instruction or register not accepted in current CPU mode

Anyone knows how to enable this?



Assembles with ML 6.15, 8.0, 9.0 and 10.0 but not with JWasm:

include \masm32\include\

   movss xmm0, dword ptr [ebx+8]
end start

P.S.: Your example works, too, with ML 9.0


first lines.....

        .MODEL  Flat,StdCall
        OPTION  CaseMap:None


works perfect for ml 9.00.30729.01 - maybe there is an include file that change the instruction set.
MREAL macros - when you need floating point arithmetic while assembling!


still not working for me...Is there a project settings I need to enable.

I moved to VS2010 and I get this:

.MODEL  Flat,StdCall
OPTION  CaseMap:None

On thing however is that my code is in 32-bit mode, should I be in 64-bit?

1>  Assembling [Inputs]...
1>weighted_avg.asm(90): error A2085: instruction or register not accepted in current CPU mode
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\masm.targets(49,5): error MSB3721: The command "ml.exe /c /nologo /Zi /Fo"Debug\weighted_avg.obj" /W3 /errorReport:prompt /Fl /Taweighted_avg.asm" exited with code 1.


never mind figured out.

my project was including another file that was turning the directive offs.



Hi  gmmo1971,

by the way: .MMX isn't really necessary if you don't use MMX instructions.

You have to know the facts before you can distort them.