diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-12 18:50:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-12 18:50:08 +0000 |
commit | 9f584df1db4c7598c3be102bffb709cb2854fac6 (patch) | |
tree | 70a6c27209d78e5556d9e9a063b6ab902d5b673e /usr.sbin/eeprom | |
parent | 182d21b02135847279bb9f73915a223c6784bac8 (diff) |
In the original sparc V7 book (and in the v8 book), the divrem leaf code used
local registers for a few temporaries. This was changed to use two global
registers. Maybe to permit use in-kernel without conflicting with the
register V7 register window handlers. (Was this done by Chris Torek? Is this
related to Gordon Irlam's work? Or was it in NetBSD? Hard to tell because
NetBSD removed their original cvs tree.)
In V8 the ABI was tightened; more global registers became offlimits in
different ways. We started supporting sun4m, and did not consider this.
As a result, the global registers chosen are the wrong choice. In
particular, %g7 is a poor choice for upcoming TLS work. It looks like
it is safer to use %g5 and %g6 since these functions are "system software".
All re-entrant parts of the system save it.
On sparc64 these functions are in libc per ABI requirement, but are unused.
On sparc, they occur in bootblocks (no reentrancy), kernel (reentrancy saves
globals; kernel is not ABI compliant), userland libc (signal handlers save
globals), and ld.so (symbol binding is not re-entrant on its own).
Discussed rather extensively with guenther, kettenis, miod and drahn.
Diffstat (limited to 'usr.sbin/eeprom')
0 files changed, 0 insertions, 0 deletions