This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 5/6] Explain why we don't make use of RDPC in the sparc PICregister setup.
- From: David Miller <davem at davemloft dot net>
- To: libc-alpha at sourceware dot org
- Date: Mon, 20 Feb 2012 21:09:58 -0500 (EST)
- Subject: [PATCH 5/6] Explain why we don't make use of RDPC in the sparc PICregister setup.
* sysdeps/unix/sparc/sysdep.h: Document why we don't use
"rd %pc" in the PIC register setup sequences.
---
ChangeLog | 3 +++
sysdeps/unix/sparc/sysdep.h | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5f966e8..c125719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-02-20 David S. Miller <davem@davemloft.net>
+ * sysdeps/unix/sparc/sysdep.h: Document why we don't use
+ "rd %pc" in the PIC register setup sequences.
+
* sysdeps/sparc/crti.S: Try to use GOTDATA relocs.
* sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise.
* sysdeps/sparc/sparc32/elf/start.S: Likewise.
diff --git a/sysdeps/unix/sparc/sysdep.h b/sysdeps/unix/sparc/sysdep.h
index 10d561e..1a095cc 100644
--- a/sysdeps/unix/sparc/sysdep.h
+++ b/sysdeps/unix/sparc/sysdep.h
@@ -39,6 +39,9 @@ __sparc_get_pc_thunk.reg: \
.previous; \
.endif;
+/* Even when v9 we use a call sequence instead of using "rd %pc" because
+ RDPC is extremely expensive and incurs a full pipeline flush. */
+
#define SETUP_PIC_REG(reg) \
SPARC_PIC_THUNK(reg) \
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %##reg; \
--
1.7.6.401.g6a319