Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * arch/alpha/lib/dbg_stackkill.S
0004  * Contributed by Richard Henderson (rth@cygnus.com)
0005  *
0006  * Clobber the balance of the kernel stack, hoping to catch
0007  * uninitialized local variables in the act.
0008  */
0009 
0010 #include <asm/asm-offsets.h>
0011 
0012     .text
0013     .set noat
0014 
0015     .align 5
0016     .globl _mcount
0017     .ent _mcount
0018 _mcount:
0019     .frame $30, 0, $28, 0
0020     .prologue 0
0021 
0022     ldi $0, 0xdeadbeef
0023     lda $2, -STACK_SIZE
0024     sll $0, 32, $1
0025     and $30, $2, $2
0026     or  $0, $1, $0
0027     lda $2, TASK_SIZE($2)
0028     cmpult  $2, $30, $1
0029     beq $1, 2f
0030 1:  stq $0, 0($2)
0031     addq    $2, 8, $2
0032     cmpult  $2, $30, $1
0033     bne $1, 1b
0034 2:  ret ($28)
0035 
0036     .end _mcount