News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

SSE-instructions in masm32

Started by Mikl__, February 21, 2018, 02:21:30 AM

Previous topic - Next topic

Mikl__

How can the SSE-instructions and registers be included in the program using the mass32 package? What kind of options need to be specified in the asm-file?

hutch--


Mikl__

Hi, hutch--!
Thank you very much!
And in masm32 is xmmword? Why ml don't undestand instructions
movaps   xmmword   ptr [eax+30h], xmm4
movsd   qword ptr [eax+40h], xmm1
cvtss2sd xmm1, xmm1
How can I replace such instructions?

jj2007

Hi Mikl!

Here is a little test piece:include \masm32\include\masm32rt.inc ; plain Masm32 for the fans of pure assembler
.686p ; recent CPU
.xmm ; allow xmm instructions

.data
src dq 1234567890abcdefh, 1234567890abcdefh

.data?
buffer db 16 dup(?)

.code
start:
  mov eax, offset buffer
  movaps oword   ptr [eax+30h], xmm4
  movups xmm1, oword ptr src
  movsd qword ptr [eax+30h], xmm1 ; invalid instruction operands with ml 6.15
  movlps qword ptr [eax+40h], xmm1 ; OK, does the same and is one byte shorter
  cvtss2sd xmm1, xmm1
  inkey "ok?"
  exit

end start

jj2007

Tell your coder that you are a miserable bot, Newsiriwan 8)

Mikl__

Quote from: jj2007 on March 08, 2018, 09:52:12 PMTell your coder that you are a miserable bot, Newsiriwan 8)
Hi, jj2007!
I did not understand what you wrote about?

jj2007

There was a post by a bot, which Hutch has deleted since. Insulting the bot is useless, so we insult at least his author :icon_mrgreen: