dbg_stackkill.S 575 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * arch/alpha/lib/dbg_stackkill.S
  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. #include <asm/asm-offsets.h>
  9. .text
  10. .set noat
  11. .align 5
  12. .globl _mcount
  13. .ent _mcount
  14. _mcount:
  15. .frame $30, 0, $28, 0
  16. .prologue 0
  17. ldi $0, 0xdeadbeef
  18. lda $2, -STACK_SIZE
  19. sll $0, 32, $1
  20. and $30, $2, $2
  21. or $0, $1, $0
  22. lda $2, TASK_SIZE($2)
  23. cmpult $2, $30, $1
  24. beq $1, 2f
  25. 1: stq $0, 0($2)
  26. addq $2, 8, $2
  27. cmpult $2, $30, $1
  28. bne $1, 1b
  29. 2: ret ($28)
  30. .end _mcount