The MASM Forum

General => The Campus => Topic started by: xanatose on June 06, 2016, 10:45:32 PM

Title: Looking for a good tutorial on SIMD
Post by: xanatose on June 06, 2016, 10:45:32 PM
While there is an excellent tutorial on using the FPU.

I wonder if there is a similar tutorial using the XMM registers.
Title: Re: Looking for a good tutorial on SIMD
Post by: jj2007 on June 06, 2016, 11:34:10 PM
Attached what I use: RTF, opens in WordPad, MS Word etc.
When used with RichMasm, try e.g. add*-- in the findbox to get this:
ADDPD--Packed Double-Precision Floating-Point Add
ADDPS--Packed Single-Precision Floating-Point Add
ADDSD--Scalar Double-Precision Floating-Point Add
ADDSS--Scalar Single-Precision Floating-Point Add
ADDSUBPD--Packed Double-FP Add/Subtract
ADDSUBPS--Packed Single-FP Add/Subtract
FADD/FADDP/FIADD--Add
HADDPD--Packed Double-FP Horizontal Add
HADDPS--Packed Single-FP Horizontal Add
PADDB/PADDW/PADDD--Packed Add
PADDQ--Packed Quadword Add
PADDSB/PADDSW--Packed Add with Saturation
PADDUSB/PADDUSW--Packed Add Unsigned with Saturation
PMADDWD--Packed Multiply and Add
Title: Re: Looking for a good tutorial on SIMD
Post by: xanatose on June 08, 2016, 03:52:34 AM
Thanks
Title: Re: Looking for a good tutorial on SIMD
Post by: rrr314159 on June 08, 2016, 02:02:46 PM
I never saw a good SIMD tutorial. Just very elementary stuff - usually for C++ programmers; the next step, Intel Architecture Manual. Nothing in between.
Title: Re: Looking for a good tutorial on SIMD
Post by: hutch-- on June 08, 2016, 04:34:38 PM
I would agree with that, the Intel manuals are the go, download the latest versions, have a coffee machine handy and some headache tablets but the latest ones have all the SSE instructions up through SSE 4.2 and the later AVX instructions as well. You will need the headache tablets for the complexity of AVX instructions.  :biggrin:
Title: Re: Looking for a good tutorial on SIMD
Post by: jj2007 on June 08, 2016, 06:19:26 PM
You are right, no good tutorials around. The manuals are the best option BUT they are in pdf format, which is a PITA. My compromise solution (posted above) derives from this old thread (http://www.masmforum.com/board/index.php?topic=13567.0), and I am quite happy with it because it is now searchable. But of course, you need an effort (and headache pills) to understand the concise language of an Intel manual 8)
Title: Re: Looking for a good tutorial on SIMD
Post by: Siekmanski on June 08, 2016, 07:29:44 PM
There is also this great book with several examples of SSE and AVX code:
Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX by Daniel Kusswurm
ISBN-13:  978-1484200650
http://www.apress.com/9781484200650?gtmf=s