Skip to content

Commit

Permalink
Explain why we don't make use of RDPC in the sparc PIC register setup.
Browse files Browse the repository at this point in the history
	* sysdeps/unix/sparc/sysdep.h: Document why we don't use
	"rd %pc" in the PIC register setup sequences.
  • Loading branch information
David S. Miller committed Feb 21, 2012
1 parent 3d2b301 commit 0722d7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions sysdeps/unix/sparc/sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit 0722d7c

Please sign in to comment.