Hi, Both NetBSD and FreeBSD seems to use older ATPCS ABI standard. As I can see it is not supported in LLVM. Seems that ATPCS is predecessor of AAPCS so I wonder how easy is to implement it in LLVM/Clang... Is it worth efforts? Any thoughts? Thanks, Damjan
> Both NetBSD and FreeBSD seems to use older ATPCS ABI standard. > As I can see it is not supported in LLVM. > > Seems that ATPCS is predecessor of AAPCS so I wonder how easy is > to implement it in LLVM/Clang... > > Is it worth efforts? Any thoughts?See http://gcc.gnu.org/ml/gcc/2010-05/msg00468.html : "Do they still want their OS to work on modern CPUs with any degree of efficiency? The current ABI diverged from the old for good technical reasons, not just for the sake of being different." If you want it to run efficiently on modern multicore systems you really need 64-bit alignment of 64-bit types. ARM dropped support for the old ABI in the reference tools years ago. Al -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On Jun 24, 2011, at 12:52 PM, Alasdair Grant wrote:>> Both NetBSD and FreeBSD seems to use older ATPCS ABI standard. >> As I can see it is not supported in LLVM. >> >> Seems that ATPCS is predecessor of AAPCS so I wonder how easy is >> to implement it in LLVM/Clang... >> >> Is it worth efforts? Any thoughts? > > See http://gcc.gnu.org/ml/gcc/2010-05/msg00468.html : > > "Do they still want their OS to work on modern CPUs with any > degree of efficiency? The current ABI diverged from the old for > good technical reasons, not just for the sake of being different." > > If you want it to run efficiently on modern multicore systems you > really need 64-bit alignment of 64-bit types. ARM dropped support > for the old ABI in the reference tools years ago.Yes, long term goal is definitely to go to aapcs. My question is more about bridging the gap until that is done and also providing compatibility with older binaries. Problem is that today Clang compiles FreeBSD code as apcs-gnu which is in my understanding wrong. Also clang fails to compile some C++ code as SizeType is defined as UnsignedLong for apcs-gnu (should be UnsignedInt).