Author Topic: SSE-instructions in masm32  (Read 1082 times)

Mikl__

  • Member
  • ****
  • Posts: 748
SSE-instructions in masm32
« 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?

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6331
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: SSE-instructions in masm32
« Reply #1 on: February 21, 2018, 02:27:15 AM »
Look at .XMM 
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Mikl__

  • Member
  • ****
  • Posts: 748
Re: SSE-instructions in masm32
« Reply #2 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?

jj2007

  • Member
  • *****
  • Posts: 9462
  • Assembler is fun ;-)
    • MasmBasic
Re: SSE-instructions in masm32
« Reply #3 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

jj2007

  • Member
  • *****
  • Posts: 9462
  • Assembler is fun ;-)
    • MasmBasic
Re: SSE-instructions in masm32
« Reply #4 on: March 08, 2018, 09:52:12 PM »
Tell your coder that you are a miserable bot, Newsiriwan 8)

Mikl__

  • Member
  • ****
  • Posts: 748
Re: SSE-instructions in masm32
« Reply #5 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?

jj2007

  • Member
  • *****
  • Posts: 9462
  • Assembler is fun ;-)
    • MasmBasic
Re: SSE-instructions in masm32
« Reply #6 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: