1	comment "subroutine declare"
2	.macro gdbasm_declare name
3	.align	2
4	.ent	\name
5	.type	\name,@function
6\name:
7	.endm
8
9	comment "subroutine prologue"
10	.macro gdbasm_enter
11	.frame	$fp, 32, $31
12	.mask	0xd0000000,-4
13	.set	noreorder
14	.cpload	$25
15	.set	reorder
16	subu	$sp, $sp, 32
17	.cprestore 16
18	sw	$31, 28($sp)
19	sw	$fp, 24($sp)
20	sw	$28, 20($sp)
21	move	$fp, $sp
22	.endm
23
24	comment "subroutine epilogue"
25	.macro gdbasm_leave
26	lw	$31, 28($sp)
27	lw	$fp, 24($sp)
28	.set	noreorder
29	.set	nomacro
30	j	$31
31	addu	$sp, $sp, 32
32	.set	macro
33	.set	reorder
34	.endm
35
36	comment "subroutine end"
37	.macro gdbasm_end name
38	.end	\name
39	.endm
40
41	.macro gdbasm_call subr
42	la	$25, \subr
43	jal	$31, $25
44	.endm
45
46	.macro gdbasm_several_nops
47	nop
48	nop
49	nop
50	nop
51	.endm
52
53	comment "exit (0)"
54	.macro gdbasm_exit0
55	comment "Don't know how to exit, but this will certainly halt..."
56	lw 	$2, 0($0)
57	.endm
58
59	comment "crt0 startup"
60	.macro gdbasm_startup
61	move	$fp, $sp
62	.endm
63