The MASM Forum

General => The Campus => Topic started by: Mikl__ on February 21, 2018, 02:21:30 AM

Title: SSE-instructions in masm32
Post by: Mikl__ on February 21, 2018, 02:21:30 AM
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?
Title: Re: SSE-instructions in masm32
Post by: hutch-- on February 21, 2018, 02:27:15 AM
Look at .XMM 
Title: Re: SSE-instructions in masm32
Post by: Mikl__ on February 21, 2018, 03:00:00 AM
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?
Title: Re: SSE-instructions in masm32
Post by: jj2007 on February 21, 2018, 05:49:31 AM
Hi Mikl!

Here is a little test piece:
Code: [Select]
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
Title: Re: SSE-instructions in masm32
Post by: jj2007 on March 08, 2018, 09:52:12 PM
Tell your coder that you are a miserable bot, Newsiriwan 8)
Title: Re: SSE-instructions in masm32
Post by: Mikl__ on March 10, 2018, 12:24:35 PM
Tell your coder that you are a miserable bot, Newsiriwan 8)
Hi, jj2007!
I did not understand what you wrote about?
Title: Re: SSE-instructions in masm32
Post by: jj2007 on March 10, 2018, 07:56:22 PM
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: