This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] SPARC: Mention global register 7 usage for TLS


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(-)

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).
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]