Port-m68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Natural alignment used on NetBSD/m68k
Do you happen to know whether NetBSD has
always used four bytes or did that
change in the past?
AFAIK, it's always been four bytes, at least since the switch to
ELF.
Looking at hp300/include/param.h rev. 1.1 from 1993:
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/arch/hp300/include/param.h?rev=1.1;content-type=text%2Fx-chdr
/*
* Round p (pointer or byte index) up to a correctly-aligned value
* for all data types (int, long, ...). The result is u_int and
* must be cast to any desired pointer type.
*/
#define ALIGN(p) (((u_int)(p) + (sizeof(int) - 1)) &~ (sizeof(int) - 1))
So, it seems as it has always been 4 bytes.
Side-note: Even VAX has always (since 32V in 1979) used 4-bytes alignment (even if it didn't have to).
-- R
Home |
Main Index |
Thread Index |
Old Index