diff options
Diffstat (limited to 'arch/alpha/lib/dbg_current.S')
-rw-r--r-- | arch/alpha/lib/dbg_current.S | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/alpha/lib/dbg_current.S b/arch/alpha/lib/dbg_current.S new file mode 100644 index 000000000000..e6d071015f9b --- /dev/null +++ b/arch/alpha/lib/dbg_current.S | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * arch/alpha/lib/dbg_current.S | ||
3 | * Contributed by Richard Henderson (rth@cygnus.com) | ||
4 | * | ||
5 | * Trap if we find current not correct. | ||
6 | */ | ||
7 | |||
8 | #include <asm/pal.h> | ||
9 | |||
10 | .text | ||
11 | .set noat | ||
12 | |||
13 | .globl _mcount | ||
14 | .ent _mcount | ||
15 | _mcount: | ||
16 | .frame $30, 0, $28, 0 | ||
17 | .prologue 0 | ||
18 | |||
19 | lda $0, -0x4000($30) | ||
20 | cmpult $8, $30, $1 | ||
21 | cmpule $0, $30, $2 | ||
22 | and $1, $2, $3 | ||
23 | bne $3, 1f | ||
24 | |||
25 | call_pal PAL_bugchk | ||
26 | |||
27 | 1: ret $31, ($28), 1 | ||
28 | |||
29 | .end _mcount | ||