Port-m68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Natural alignment used on NetBSD/m68k
Hello,
can anyone tell me whether NetBSD/m68k uses a natural alignment of two or four bytes?
I'm asking since Linux/m68k defaults to two bytes alignment which has started to become
a burden as more and more programs require at least four bytes alignment these days.
Software that is affected includes CPython, LLVM, Mold, gccgo and many more.
As Debian's m68k maintainer, I have been trying to convince the community to switch to
four bytes alignment, but so far an agreement has not been made. On the other hand, the
original SysV Unix ABI released by Motorola [1] defaults to four bytes alignment.
And maybe someone could compile and run the following code on a NetBSD/m68k instance to
confirm the alignment to be four bytes:
#include <stdio.h>
typedef struct { char x; int y; } test_t;
int main(void)
{
printf("%d\n", sizeof(test_t) / 2);
}
Thanks,
Adrian
> [1] https://books.google.de/books/about/System_V_Application_Binary_Interface.html?id=7bImAAAAMAAJ&redir_esc=y
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Home |
Main Index |
Thread Index |
Old Index