I have this assembly directive called .p2align that is being generated by gcc from the source of a C program.
As I understand aligned access is faster that the unaligned one, also an asm program doesn't automatically align the memory locations or optimize memory access, so you have to do this.
I can't really read this .p2align 4,,15, especially the last part, that 15.
Skipping the fact that apparently gcc generates 2 , instead of just 1, as reported by many docs; what I get is that this piece of asm aligns memory in such a way that each location occupies 2^4 bits, which means 16 bit, so I think that it's fair to say that a WORD is 16 bit long in this case.
Now what 15 possibly means ? It's a number of bits for what ? Does the counting start from 0 so the "real" quantity is 16 instead of 15 ?
EDIT:
I just translated the same C source to both 32 bit and 64 asm code, the memory is always aligned in the same exact way with the same directive .p2align 4,,15. Why is that ?
 
     
     
     
    