unw_getcontext() should return UNW_ESUCCESS on success. Therefore, the
assembly for AArch64 is incorrect because "ldr x0, #0" is a PC-relative
load instead of an immediate value load.
llvm-svn: 240648
stp d28,d29, [x0, #0x1F0]
str d30, [x0, #0x200]
str d31, [x0, #0x208]
- ldr x0, #0 // return UNW_ESUCCESS
+ mov x0, #0 // return UNW_ESUCCESS
ret
#elif defined(__arm__) && !defined(__APPLE__)
--- /dev/null
+#include <assert.h>
+#include <libunwind.h>
+
+int main() {
+ unw_context_t context;
+ int ret = unw_getcontext(&context);
+ assert(ret == UNW_ESUCCESS);
+}