I'm converting some of my 64-bit linux assembly to 64-bit MASM, and have a problem with the ALIGN directive. The following code generates this error: "A2189: invalid combination with segment alignment : 64":
.DATA
ALIGN 64
ALIGN 16 assembles okay, but MASM64 doesn't accept ALIGN32 or ALIGN 64 in CODE or DATA segment. This is STUPID, since cache lines align on 64-byte boundaries. And this is even more EXTREMELY STUPID since 256-bit SIMD instructions require 32-byte alignment. The code I'm porting has lots of AVX and FMA4 type 256-bit SIMD instructions, so this matters A LOT.
The ML64 I have came with the copy of "VisualStudio2005 professional" I purchased years ago, though somehow I doubt that matters.
What's the problem?
Try JWasm (http://www.japheth.de/JWasm.html), it's the better choice anyway for 64-bit assembly.
have you looked at JwAsm ?
http://www.japheth.de/JWasm.html
lol Jochen beat me to it :P
If you use explicit segments you can change the align
data segment align(4096)
will let you use any power of 2 alignment from 2 to 4096.
eta: default alignment is PARA (16)
another wrinkle with a code segment
cseg segment read execute
else you get an access violation on your entry point :bdg