xref: /linux/arch/alpha/lib/dbg_current.S (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * arch/alpha/lib/dbg_current.S
4 * Contributed by Richard Henderson (rth@cygnus.com)
5 *
6 * Trap if we find current not correct.
7 */
8
9#include <asm/pal.h>
10
11	.text
12	.set noat
13
14	.globl _mcount
15	.ent _mcount
16_mcount:
17	.frame $30, 0, $28, 0
18	.prologue 0
19
20	lda	$0, -0x4000($30)
21	cmpult	$8, $30, $1
22	cmpule	$0, $30, $2
23	and	$1, $2, $3
24	bne	$3, 1f
25
26	call_pal PAL_bugchk
27
281:	ret	$31, ($28), 1
29
30	.end _mcount
31