summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2019-02-03 15:24:17 +0000
committerkettenis <kettenis@openbsd.org>2019-02-03 15:24:17 +0000
commit904ff9a2689ab293783b1642bea8f3b81bc01042 (patch)
tree56de89c4d2b595653bcb1868b26fe6d1225319fc
parentConvert openssl(1) rsautl to the newer style of option handling. (diff)
downloadwireguard-openbsd-904ff9a2689ab293783b1642bea8f3b81bc01042.tar.xz
wireguard-openbsd-904ff9a2689ab293783b1642bea8f3b81bc01042.zip
Turns out I botched the previous commit. While making the %o7 + 8 bit
consistent across the various low-level interfaces that handle the instruction pointer, reality turns out to be a bit more subtle. On SPARC, DWARF2 uses r15 (which maps to %o7) as the return address column. This means that we should not add/subtract 8 when it reads/updates the register state while processing DWARF2 instructions. That in turn means that getIP() and setIP() should not have been changed in my previous commit. ok visa@
-rw-r--r--lib/libunwind/src/Registers.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libunwind/src/Registers.hpp b/lib/libunwind/src/Registers.hpp
index 2a23bb77c9b..6676daa1b09 100644
--- a/lib/libunwind/src/Registers.hpp
+++ b/lib/libunwind/src/Registers.hpp
@@ -2648,8 +2648,8 @@ public:
uint64_t getSP() const { return _registers.__o[6] + 2047; }
void setSP(uint64_t value) { _registers.__o[6] = value - 2047; }
- uint64_t getIP() const { return _registers.__o[7] + 8; }
- void setIP(uint64_t value) { _registers.__o[7] = value - 8; }
+ uint64_t getIP() const { return _registers.__o[7]; }
+ void setIP(uint64_t value) { _registers.__o[7] = value; }
uint64_t getWCookie() const { return _wcookie; }
private: