diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-19 22:15:31 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-19 22:15:31 +0000 |
commit | 02635c61a31382db4455ea6ad16c5a28049023f4 (patch) | |
tree | 5b1dcc504555b5a2f7844ede6ae4ad989731343e | |
parent | 7801d073571e55fef3ddf6346359fac8db73523e (diff) | |
download | gcc-02635c61a31382db4455ea6ad16c5a28049023f4.tar.gz |
Fix TLS read accesses on Linux/x86.
* config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
(gtm_thr): Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@180220 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libitm/ChangeLog | 5 | ||||
-rw-r--r-- | libitm/config/linux/x86/tls.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog index f27ff2fab44..864b966fbf9 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,5 +1,10 @@ 2011-10-19 Torvald Riegel <triegel@redhat.com> + * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile. + (gtm_thr): Same. + +2011-10-19 Torvald Riegel <triegel@redhat.com> + * libitm_i.h: Add gl_wt dispatch. * retry.cc (parse_default_method): Same. * method-gl.cc: New file. diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h index 3d247e33e80..2525f3678ad 100644 --- a/libitm/config/linux/x86/tls.h +++ b/libitm/config/linux/x86/tls.h @@ -72,7 +72,7 @@ namespace GTM HIDDEN { static inline struct gtm_thread *gtm_thr(void) { struct gtm_thread *r; - asm (SEG_READ(10) : "=r"(r)); + asm volatile (SEG_READ(10) : "=r"(r)); return r; } @@ -84,7 +84,7 @@ static inline void set_gtm_thr(struct gtm_thread *x) static inline struct abi_dispatch *abi_disp(void) { struct abi_dispatch *r; - asm (SEG_DECODE_READ(11) : "=r"(r)); + asm volatile (SEG_DECODE_READ(11) : "=r"(r)); return r; } |