Help!
I need to write some code for SIMD, 64-bit Intel X86. I am fluent with Masm; Where can I get a Masm version for 64-bit, and some documentation as to the changes in registers, changes in instructions set, etc?
Anybody here has some experience with AVX ? any usefule sources and tips?
Thanks

Recommended Answers

All 5 Replies

Most all of this sort of reference documentation is online at Intel's web site. As for a macro assembler, is this for Windows or Linux? There is the yasm assembler for Linux. From the man page:


The Yasm Modular Assembler is a portable, retargetable assembler written under the “new” (2 or 3 clause) BSD
license. Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes,
outputs binary, ELF32, ELF64, COFF, Win32, and Win64 object formats, and generates source debugging information
in STABS, DWARF 2, and CodeView 8 formats.

Also, here is a link to the latest Intel processor instruction set: http://download.intel.com/design/processor/datashts/324642.pdf

I need compilation for Windows (XP,7). Perhaps Linux later. I write code in C/C++ (using Microsoft Visual C ) and code the computation-intensive parts in ASM. The Assembler routines are structured as C routines. Simple snippets are coded as "asm" in-line assembly code For larger ones, I prefere a macro-asembler because it allows macros, loop-unroling, etc.
My way of programming is first to write everything in C, debug it, and then replace some snippets with assembly. As a rule, I DO NOT call any OS routine from an assembler procedure.

So, are you using Visual Studio then for your Windows programming? I thought VC and VC++ both supported in-line assembly code, just as GCC G++ do. And then there is the Microsoft macro assembler (MASM) which should be part of Visual Studio, or at least some versions (Professional or Enterprise).

Thanks. I code with old, reliable Visual C 6.0 + Processors Pack, good enough for me. My Masm version is of 2005. But I could switch to the current bloated versions if required. So I'll download a current Visual Studio and check.
Anybody here has some real-life experience with AVX? Is it supported by current Visual C in-line assembly? Is it supported by current Visual C's Masm? Is it worth the trouble?

Yes I have some real-life experience but i just begin exploring AVX. AVX add support for 256-bit wide registers but only for floating point operations. Integer operations are limited to 128-bit like before. If you are using 128-bit operations speed of AVX and SSE is almost identical. Programming is AVX is easier than in SSE beacuse it support all SSE instructions SSE1-SSE4 so you don't need to test if processor support SSE41 to use some instructions that are not supported in SSE2 etc... It also support 3-operand instruction which also helps a little. Currently FMA is not supported. Because i want maximum performance for my applications i wrote my own assembler that i connected with Python so i can in runtime generate machine code and execute it all from Python. You can see on www.tahir007.com how assembler is used from Python. Version on the web is very old and doesn't support lot's features including AVX that my current version support. I hope that I will very soon put new version on the web....

commented: Very useful technical information. +8
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.