blob: b3b6fc94f7f321439f60ba0bcb853eb0af9636a0 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Uwe Zeisbergerf30c2262006-10-03 23:01:26 +02003 * arch/alpha/lib/dbg_stackcheck.S
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * Contributed by Richard Henderson (rth@tamu.edu)
5 *
6 * Verify that we have not overflowed the stack. Oops if we have.
7 */
8
Sam Ravnborge2d5df92005-09-09 21:28:48 +02009#include <asm/asm-offsets.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
11 .text
12 .set noat
13
14 .align 3
15 .globl _mcount
16 .ent _mcount
17_mcount:
18 .frame $30, 0, $28, 0
19 .prologue 0
20
21 lda $0, TASK_SIZE($8)
22 cmpult $30, $0, $0
23 bne $0, 1f
24 ret ($28)
251: stq $31, -8($31) # oops me, damn it.
26 br 1b
27
28 .end _mcount