summaryrefslogtreecommitdiff
path: root/sysdeps/microblaze
diff options
context:
space:
mode:
authorDavid Holsgrove <david.holsgrove@xilinx.com>2014-12-29 12:22:26 +1000
committerDavid Holsgrove <david.holsgrove@xilinx.com>2015-01-09 14:49:22 +1000
commitb360ee62d2c13b69ca58a36907093d9cf0f4b7a4 (patch)
tree2c203b875ca9347f7e7a7f9d9b36eb7b66cf310d /sysdeps/microblaze
parentcaff764e8c3cddb21b62601773bdae4806a9c541 (diff)
MicroBlaze: Fix volatile-register-var warning in READ_THREAD_POINTER
Resolves warning: 'optimization may eliminate reads and/or writes to register variables' 2015-01-06 David Holsgrove <david.holsgrove@xilinx.com> * sysdeps/microblaze/nptl/tls.h: Remove inline __microblaze_get_thread_area and update READ_THREAD_POINTER. Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Diffstat (limited to 'sysdeps/microblaze')
-rw-r--r--sysdeps/microblaze/nptl/tls.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h
index fb4a71a8c3..171a745db9 100644
--- a/sysdeps/microblaze/nptl/tls.h
+++ b/sysdeps/microblaze/nptl/tls.h
@@ -59,14 +59,9 @@ typedef struct
void *private;
} tcbhead_t;
-static inline void *__microblaze_get_thread_area (void)
-{
- register void * volatile __microblaze_thread_area asm ("r21");
- return (void *) __microblaze_thread_area;
-}
-
-# define READ_THREAD_POINTER() \
- ({ __microblaze_get_thread_area(); })
+#define READ_THREAD_POINTER() \
+ ({ register void *__microblaze_thread_area asm ("r21"); \
+ __microblaze_thread_area; })
/* This is the size of the initial TCB. */
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)