48 template<
bool STRICT_UNWINDING>
50 void **new_sp =
static_cast<void **
>(*old_sp);
54 if (STRICT_UNWINDING) {
57 if (new_sp <= old_sp)
return NULL;
59 if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000)
return NULL;
63 if (new_sp == old_sp)
return NULL;
66 && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000))
return NULL;
68 if ((uintptr_t)new_sp & (
sizeof(
void *) - 1))
return NULL;
84 __asm__
volatile (
"mr %0,r1" :
"=r" (sp));
86 __asm__
volatile (
"mr %0,1" :
"=r" (sp));
102 while (sp &&
n < max_depth) {
103 if (skip_count > 0) {
110 #if defined(_CALL_AIX) || defined(_CALL_DARWIN)
111 result[
n++] = *(sp+2);
112 #elif defined(_CALL_SYSV)
113 result[
n++] = *(sp+1);
114 #elif defined(__APPLE__) || ((defined(__linux) || defined(__linux__)) && defined(__PPC64__))
116 result[
n++] = *(sp+2);
117 #elif defined(__linux) || defined(__OpenBSD__)
119 result[
n++] = *(sp+1);
121 #error Need to specify the PPC ABI for your archiecture.
125 sp = NextStackFrame<true>(sp);
130 _END_GOOGLE_NAMESPACE_