Skip to content

Commit b6fed5b

Browse files
committed
Add comment about instruction sequence
1 parent e139054 commit b6fed5b

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

libunwind/src/UnwindCursor.hpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@
5858
#include "RWMutex.hpp"
5959
#include "Unwind-EHABI.h"
6060

61-
#if defined(__AARCH64EB__)
62-
#define MOVZ_X8_8B 0x681180d2
63-
#define SVC_0 0x010000d4
64-
#else
65-
#define MOVZ_X8_8B 0xd2801168
66-
#define SVC_0 0xd4000001
67-
#endif
68-
6961
#if defined(_LIBUNWIND_SUPPORT_SEH_UNWIND)
7062
// Provide a definition for the DISPATCHER_CONTEXT struct for old (Win7 and
7163
// earlier) SDKs.
@@ -2811,6 +2803,21 @@ void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) {
28112803

28122804
#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) && \
28132805
defined(_LIBUNWIND_TARGET_AARCH64)
2806+
2807+
/*
2808+
* The linux sigreturn restorer stub will always have the form:
2809+
*
2810+
* d2801168 movz x8, #0x8b
2811+
* d4000001 svc #0x0
2812+
*/
2813+
#if defined(__AARCH64EB__)
2814+
#define MOVZ_X8_8B 0x681180d2
2815+
#define SVC_0 0x010000d4
2816+
#else
2817+
#define MOVZ_X8_8B 0xd2801168
2818+
#define SVC_0 0xd4000001
2819+
#endif
2820+
28142821
template <typename A, typename R>
28152822
bool UnwindCursor<A, R>::setInfoForSigReturn(Registers_arm64 &) {
28162823
// Look for the sigreturn trampoline. The trampoline's body is two

0 commit comments

Comments
 (0)