The MASM Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
MASM32 Downloads
Home
Help
Search
Login
Register
The MASM Forum
»
Projects
»
MASM32
»
can't enable vector (SSE2) instructions
« previous
next »
Print
Pages: [
1
]
Author
Topic: can't enable vector (SSE2) instructions (Read 12270 times)
gmmo1971
Guest
can't enable vector (SSE2) instructions
«
on:
February 07, 2013, 08:50:08 AM »
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:
.686
.XMM
.MODEL FLAT
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?
thx!
Logged
jj2007
Member
Posts: 13857
Assembly is fun ;-)
Re: can't enable vector (SSE2) instructions
«
Reply #1 on:
February 07, 2013, 08:54:35 AM »
Assembles with ML 6.15, 8.0, 9.0 and 10.0 but not with JWasm:
include \masm32\include\masm32rt.inc
.xmm
.code
start:
exit
movss xmm0, dword ptr [ebx+8]
end start
P.S.: Your example works, too, with ML 9.0
Logged
Masm32 Tips, Tricks and Traps
dedndave
Member
Posts: 8828
Still using Abacus 2.0
Re: can't enable vector (SSE2) instructions
«
Reply #2 on:
February 07, 2013, 08:55:24 AM »
first lines.....
Code:
[Select]
.686p
.MODEL Flat,StdCall
OPTION CaseMap:None
.MMX
.XMM
Logged
qWord
Member
Posts: 1475
The base type of a type is the type itself
Re: can't enable vector (SSE2) instructions
«
Reply #3 on:
February 07, 2013, 09:02:38 AM »
works perfect for ml 9.00.30729.01 - maybe there is an include file that change the instruction set.
Logged
MREAL macros
- when you need floating point arithmetic while assembling!
gmmo1971
Guest
Re: can't enable vector (SSE2) instructions
«
Reply #4 on:
February 07, 2013, 09:16:26 AM »
still not working for me...Is there a project settings I need to enable.
I moved to VS2010 and I get this:
.686p
.MODEL Flat,StdCall
OPTION CaseMap:None
.MMX
.XMM
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.
Logged
gmmo1971
Guest
Re: can't enable vector (SSE2) instructions
«
Reply #5 on:
February 07, 2013, 09:27:33 AM »
never mind figured out.
my project was including another file that was turning the directive offs.
thx!
Logged
Gunther
Member
Posts: 4177
Forgive your enemies, but never forget their names
Re: can't enable vector (SSE2) instructions
«
Reply #6 on:
February 07, 2013, 09:51:30 AM »
Hi gmmo1971,
by the way: .MMX isn't really necessary if you don't use MMX instructions.
Gunther
Logged
You have to know the facts before you can distort them.
Print
Pages: [
1
]
« previous
next »
The MASM Forum
»
Projects
»
MASM32
»
can't enable vector (SSE2) instructions