mirror of
https://github.com/QuasarApp/backward-cpp.git
synced 2025-05-20 21:39:39 +00:00
Merge pull request #67 from chsterz/feature/aarch64-support
Add aarch64 support
This commit is contained in:
commit
857bc8fc31
@ -2036,6 +2036,8 @@ private:
|
|||||||
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.gregs[REG_EIP]);
|
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.gregs[REG_EIP]);
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.arm_pc);
|
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.arm_pc);
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.pc);
|
||||||
#elif defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__)
|
#elif defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__)
|
||||||
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.regs->nip);
|
error_addr = reinterpret_cast<void*>(uctx->uc_mcontext.regs->nip);
|
||||||
#else
|
#else
|
||||||
|
@ -64,6 +64,8 @@ TEST_ABORT (calling_abort)
|
|||||||
abort_abort_I_repeat_abort_abort();
|
abort_abort_I_repeat_abort_abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// aarch64 does not trap Division by zero
|
||||||
|
#ifndef __aarch64__
|
||||||
volatile int zero = 0;
|
volatile int zero = 0;
|
||||||
|
|
||||||
int divide_by_zero()
|
int divide_by_zero()
|
||||||
@ -78,6 +80,7 @@ TEST_DIVZERO (divide_by_zero)
|
|||||||
int v = divide_by_zero();
|
int v = divide_by_zero();
|
||||||
std::cout << "v=" << v << std::endl;
|
std::cout << "v=" << v << std::endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int bye_bye_stack(int i) {
|
int bye_bye_stack(int i) {
|
||||||
return bye_bye_stack(i + 1) + bye_bye_stack(i * 2);
|
return bye_bye_stack(i + 1) + bye_bye_stack(i * 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user