Subject: Re: Q: ARM32 ABI
To: Godmar Back <gback@cs.utah.edu>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 06/03/1998 10:40:52
>
> Hi, I apologize if this is a FAQ:
>
> could somebody point me to the ABI for the arm32?
>
> Specifically, I am interested in reading about the calling conventions
> for C function on one of the Digital Shark machine running NetBSD 1.3.
> (i.e., what registers are caller/callee saved, etc.)
>
> The reason I'm asking is that I would like to try porting the Kaffe
> virtual machine. (www.kaffe.org.) Calling conventions constitute one
> of the few machine-dependent parts of that JVM.
>
> Thanks,
>
> Godmar
>
It's a little informal, but basically it uses the ARM APCS with the
options of 32-bit PC, implicit stack checking, floating point arguments in
integer registers (actually, it now uses full software floating point
rules, so even return results are now in integer registers) and
non-reentrant code. There is one deviation from the full APCS in that
structures are only aligned to the most aligned element they contain
(rather than always at least word aligned) -- this is because the netbsd
code base contains bugs in it which makes full conformance with the APCS
difficult if not impossible.
The APCS is documented in the ARM SDT reference guide, but I'm afraid that
is only available with the ARM toolkit (I'm not aware of this document
being on the ARM Web server). Educational establishments can obtain older
versions of the SDT (which still contain the documentation in PDF format)
via ARM's University Programme; others can try requesting demo versions of
the SDT which also contain PDF copies of the documentation. See the Web
pages (www.arm.com) for details of both of these.
Richard.