| 1 | /* SPDX-License-Identifier: GPL-2.0 */
|
| 2 | /*
|
| 3 | * arch/alpha/lib/dbg_stackkill.S
|
| 4 | * Contributed by Richard Henderson (rth@cygnus.com)
|
| 5 | *
|
| 6 | * Clobber the balance of the kernel stack, hoping to catch
|
| 7 | * uninitialized local variables in the act.
|
| 8 | */
|
| 9 |
|
| 10 | |
| 11 |
|
| 12 | .text
|
| 13 | .set noat
|
| 14 |
|
| 15 | .align 5
|
| 16 | .globl _mcount
|
| 17 | .ent _mcount
|
| 18 | _mcount:
|
| 19 | .frame $30, 0, $28, 0
|
| 20 | .prologue 0
|
| 21 |
|
| 22 | ldi $0, 0xdeadbeef
|
| 23 | lda $2, -STACK_SIZE
|
| 24 | sll $0, 32, $1
|
| 25 | and $30, $2, $2
|
| 26 | or $0, $1, $0
|
| 27 | lda $2, TASK_SIZE($2)
|
| 28 | cmpult $2, $30, $1
|
| 29 | beq $1, 2f
|
| 30 | 1: stq $0, 0($2)
|
| 31 | addq $2, 8, $2
|
| 32 | cmpult $2, $30, $1
|
| 33 | bne $1, 1b
|
| 34 | 2: ret ($28)
|
| 35 |
|
| 36 | .end _mcount
|