aboutsummaryrefslogtreecommitdiff
path: root/asm/misc.S
diff options
context:
space:
mode:
Diffstat (limited to 'asm/misc.S')
-rw-r--r--asm/misc.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/asm/misc.S b/asm/misc.S
index ccb30d1..00c7f78 100644
--- a/asm/misc.S
+++ b/asm/misc.S
@@ -17,6 +17,7 @@
#include <asm-utils.h>
#include <asm-offsets.h>
#include <processor.h>
+#include <stack.h>
.section ".text","ax"
.balign 0x10
@@ -41,3 +42,11 @@ trigger_attn:
isync
attn
blr
+
+#ifdef STACK_CHECK_ENABLED
+.global _mcount
+_mcount:
+ mr %r3,%r1
+ mflr %r4
+ b __mcount_stack_check
+#endif