[MLton] Port to HP-UX/IA64 done
Ville Laurikari
ville at laurikari.net
Mon Feb 4 03:56:32 PST 2008
On Thu, Jan 31, 2008 at 08:53:01AM -0600, Matthew Fluet wrote:
> I think these are all benign, although I am surprised that on a 32-bit
> build, GCC wants to give a struct of two 32-bit values 64-bit alignment.
According to [1] 32-bit ints should be aligned on a 4-byte boundary.
Structs should be aligned according to their most strictly aligned
component. However, dynamically allocated regions (e.g. from
malloc()) must be aligned more strictly:
size in bytes | alignment required
-------------------+----------------------------
1 | none
2 | 2-byte boundary
3-4 | 4-byte boundary
5-8 | 8-byte boundary
9- | 16-byte boundary
As far as I can tell from some mailing list discussions, GCC does not
always respect the 16-byte boundary requirement for large objects on
IA64. This can be problematic when linking with code compiled with
the Intel C Compiler, which does things by the book in this respect.
The posts I read about this were a few years old, so this may have
changed by now. I didn't check.
Misaligned accesses are supported, but "at a substantial penalty".
Anyway, at least we have MLton working on HPUX/IA64 now. Some
applications are probably suffering from the misaligned access
penalty, but they are probably suffering even more from the C-codegen.
By the way, the IA64 binaries are now on http://mlton.org/Experimental.
[1] "Itanium Software Conventions and Runtime Architecture"
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=821ffd06ab1b7110VgnVCM100000275d6e10RCRD
--
http://www.iki.fi/vl/
More information about the MLton
mailing list