dbg_stackcheck.S 466 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * arch/alpha/lib/dbg_stackcheck.S
  4. * Contributed by Richard Henderson ([email protected])
  5. *
  6. * Verify that we have not overflowed the stack. Oops if we have.
  7. */
  8. #include <asm/asm-offsets.h>
  9. .text
  10. .set noat
  11. .align 3
  12. .globl _mcount
  13. .ent _mcount
  14. _mcount:
  15. .frame $30, 0, $28, 0
  16. .prologue 0
  17. lda $0, TASK_SIZE($8)
  18. cmpult $30, $0, $0
  19. bne $0, 1f
  20. ret ($28)
  21. 1: stq $31, -8($31) # oops me, damn it.
  22. br 1b
  23. .end _mcount