summaryrefslogtreecommitdiff
path: root/pprofile.a
diff options
context:
space:
mode:
authorJohn van Groningen2003-07-11 11:59:28 +0000
committerJohn van Groningen2003-07-11 11:59:28 +0000
commit08b6b61214062da92aafcc179e222122c5ef4f74 (patch)
treeecdc5dd45ff7703dc42c944587418ec3bd98dd3b /pprofile.a
parent@ before write_heap label instead of _ (diff)
added stack overflow detection using virtual memory and exceptions
Diffstat (limited to 'pprofile.a')
-rw-r--r--pprofile.a4
1 files changed, 3 insertions, 1 deletions
diff --git a/pprofile.a b/pprofile.a
index 7adc9f2..34079c0 100644
--- a/pprofile.a
+++ b/pprofile.a
@@ -340,7 +340,7 @@ profile_l:
lwz r12,Globals.end_profile_stack(r5)
endif
stw r6,Globals.stack_pointer(r5)
- if CHECK_STACK_OVERFLOWS
+ if CHECK_STACK_OVERFLOWS
cmpw r6,r12
bge profile_stack_overflow
endif
@@ -1166,6 +1166,8 @@ init_profiler:
if 1
lea r3,stack_size
lwz r3,0(r3)
+ addi r3,r3,4095
+ rlwinm r3,r3,0,0,31-12
else
li r3, (512*1024) % 65536
addis r3,r3,(512*1024) / 65536