diff mbox

SPARC: Mention global register 7 usage for TLS

Message ID 1394297952-4261-1-git-send-email-sebastian.huber@embedded-brains.de
State New
Headers show

Commit Message

Sebastian Huber March 8, 2014, 4:59 p.m. UTC
Are the global registers 5 and 6 really available for the operating
system or uses GCC or the linker them for a special purpose?  Is it
possible to document this somewhere in to standard documentation and not
only in a header file?

gcc/ChangeLog
2014-03-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* config/sparc/sparc.h: Mention global register 7 usage for TLS.
---
 gcc/config/sparc/sparc.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Eric Botcazou March 15, 2014, 10:01 p.m. UTC | #1
> Are the global registers 5 and 6 really available for the operating
> system or uses GCC or the linker them for a special purpose?  Is it
> possible to document this somewhere in to standard documentation and not
> only in a header file?

This is documented in the ABIs so I think that the comment is fine as-is.
diff mbox

Patch

diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index dd2b5ad..23c79fc 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -637,16 +637,17 @@  extern enum cmodel sparc_cmodel;
 
    On non-v9 systems:
    g1 is free to use as temporary.
-   g2-g4 are reserved for applications.  Gcc normally uses them as
+   g2-g4 are reserved for applications.  GCC normally uses them as
    temporaries, but this can be disabled via the -mno-app-regs option.
-   g5 through g7 are reserved for the operating system.
+   g5 and g6 are reserved for the operating system.
+   g7 is used for thread-local storage (TLS) in the initial exec TLS model.
 
    On v9 systems:
    g1,g5 are free to use as temporaries, and are free to use between calls
    if the call is to an external function via the PLT.
    g4 is free to use as a temporary in the non-embedded case.
    g4 is reserved in the embedded case.
-   g2-g3 are reserved for applications.  Gcc normally uses them as
+   g2-g3 are reserved for applications.  GCC normally uses them as
    temporaries, but this can be disabled via the -mno-app-regs option.
    g6-g7 are reserved for the operating system (or application in
    embedded case).