I'm not 100% sure if this is what you're asking, but if you want a simple platform-independent way to align a data structure on a 16 byte boundary, and you don't mind wasting 15 bytes of memory, you can simply do something like the following, which allocates a struct foo aligned to a 16 byte boundary, pointed to by fooptr:
struct foo {
int x;
int y;
};
char fooplus[sizeof(struct foo)+15];
struct foo *fooptr;
static
void
fooinit()
{
printf("fooplus = 0x%x\n", fooplus);
fooptr = (struct foo *)(((int)fooplus+15)&~15);
printf("fooptr = 0x%x\n", fooptr);
}
And you'll end up with addresses like:
fooplus = 0x20000158
fooptr = 0x20000160
I actually put all of my "alignment sensitive" variables at the start of my data section in the linker command file, so I can control their addresses more carefully (mine actually need 512 byte alignment, and I don't want to waste 511 bytes to get it!).