0001
0002
0003
0004
0005
0006
0007
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