Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Uwe Zeisberger | f30c226 | 2006-10-03 23:01:26 +0200 | [diff] [blame] | 2 | * arch/alpha/lib/dbg_stackkill.S |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * Contributed by Richard Henderson (rth@cygnus.com) |
| 4 | * |
| 5 | * Clobber the balance of the kernel stack, hoping to catch |
| 6 | * uninitialized local variables in the act. |
| 7 | */ |
| 8 | |
Sam Ravnborg | e2d5df9 | 2005-09-09 21:28:48 +0200 | [diff] [blame] | 9 | #include <asm/asm-offsets.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | |
| 11 | .text |
| 12 | .set noat |
| 13 | |
| 14 | .align 5 |
| 15 | .globl _mcount |
| 16 | .ent _mcount |
| 17 | _mcount: |
| 18 | .frame $30, 0, $28, 0 |
| 19 | .prologue 0 |
| 20 | |
| 21 | ldi $0, 0xdeadbeef |
| 22 | lda $2, -STACK_SIZE |
| 23 | sll $0, 32, $1 |
| 24 | and $30, $2, $2 |
| 25 | or $0, $1, $0 |
| 26 | lda $2, TASK_SIZE($2) |
| 27 | cmpult $2, $30, $1 |
| 28 | beq $1, 2f |
| 29 | 1: stq $0, 0($2) |
| 30 | addq $2, 8, $2 |
| 31 | cmpult $2, $30, $1 |
| 32 | bne $1, 1b |
| 33 | 2: ret ($28) |
| 34 | |
| 35 | .end _mcount |