[rtems commit] doc: Clarify ABI in SPARC CPU supplement
Sebastian Huber
sebh at rtems.org
Tue Sep 16 04:56:03 UTC 2014
Module: rtems
Branch: master
Commit: 1434dbd6eb11a5dfa48bb28a786c6a4549faa166
Changeset: http://git.rtems.org/rtems/commit/?id=1434dbd6eb11a5dfa48bb28a786c6a4549faa166
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Sep 12 13:31:50 2014 +0200
doc: Clarify ABI in SPARC CPU supplement
---
doc/cpu_supplement/sparc.t | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/doc/cpu_supplement/sparc.t b/doc/cpu_supplement/sparc.t
index d0b7641..5ed0ec6 100644
--- a/doc/cpu_supplement/sparc.t
+++ b/doc/cpu_supplement/sparc.t
@@ -214,11 +214,9 @@ initialization time.
@section Calling Conventions
-
-Each high-level language compiler generates
-subroutine entry and exit code based upon a set of rules known
-as the compiler's calling convention. These rules address the
-following issues:
+Each high-level language compiler generates subroutine entry and exit code
+based upon a set of rules known as the application binary interface (ABI)
+calling convention. These rules address the following issues:
@itemize @bullet
@item register preservation and usage
@@ -228,12 +226,13 @@ following issues:
@item call and return mechanism
@end itemize
-A compiler's calling convention is of importance when
-interfacing to subroutines written in another language either
-assembly or high-level. Even when the high-level language and
-target processor are the same, different compilers may use
-different calling conventions. As a result, calling conventions
-are both processor and compiler dependent.
+An ABI calling convention is of importance when interfacing to subroutines
+written in another language either assembly or high-level. It determines also
+the set of registers to be saved or restored during a context switch and
+interrupt processing.
+
+The ABI relevant for RTEMS on SPARC is defined by SYSTEM V APPLICATION BINARY
+INTERFACE, SPARC Processor Supplement, Third Edition.
@subsection Programming Model
@@ -567,6 +566,12 @@ call and return mechanism does not automatically save and
restore any registers. This is accomplished via the save and
restore instructions which manage the set of registers windows.
+In case a floating-point unit is supported, then floating-point return values
+appear in the floating-point registers. Single-precision values occupy %f0;
+double-precision values occupy %f0 and %f1. Otherwise, these are scratch
+registers. Due to this the hardware and software floating-point ABIs are
+incompatible.
+
@subsection Calling Mechanism
All RTEMS directives are invoked using the regular
More information about the vc
mailing list