Following the gas instruction manual:
“For other systems, including the i386 using a.out format, it is the number of low-order zero bits the location counter must have after advancement. For example `.align 3′ advances the location counter until it a multiple of 8. If the location counter is already a multiple of 8, no change is needed.”
My code is:
.align 3
.double 3.84830000000000e-01
ie, align to 8, but the error is:
Error: alignment not a power of 2
There are two meanings of .align specified in the gas manual, the count of lower order zero bits, and the modulo. So for align to 8, there is .align 3 for the former, and .align 8 for the latter.
AMD64 is not broken out in the gas manual, it is rolled into the “80386 dependent features” section. It seems the mode of the .align directive got changed in going from I386 to AMD64 model, but I can’t find any mention of this in the manual.
I just wanted to verify this with the gas/gcc experts here.