Ivy Bridge, the 22nm followon from Sandy Bridge, will allow user mode access to FS
and GS. One or the other of these registers is currently used by the OS to hold
the address of the operating system's thread-local-storage. If the other isn't
used by the OS, and can be set in user mode, then it can be used to hold the
address of the JavaThread structure for a given thread, i.e., the JVM TLS. On
64-bit, this would free up r15 for general use (it currently contains the JVM
TLS address), and on 32-bit, it would make possible to eliminate calls to
pthread_getspecific (posix) or thr_getspecific (solaris), or in the cases where
OS TLS is directly accessible, eliminate the load(s) required to get the JVM
TLS address into a register.
and GS. One or the other of these registers is currently used by the OS to hold
the address of the operating system's thread-local-storage. If the other isn't
used by the OS, and can be set in user mode, then it can be used to hold the
address of the JavaThread structure for a given thread, i.e., the JVM TLS. On
64-bit, this would free up r15 for general use (it currently contains the JVM
TLS address), and on 32-bit, it would make possible to eliminate calls to
pthread_getspecific (posix) or thr_getspecific (solaris), or in the cases where
OS TLS is directly accessible, eliminate the load(s) required to get the JVM
TLS address into a register.