Home | History | Annotate | Line # | Download | only in gdb.asm
      1  1.1  christos 	comment "subroutine declare"
      2  1.1  christos 	.purgem gdbasm_declare
      3  1.1  christos 	.macro gdbasm_declare name
      4  1.1  christos 	.ent	\name
      5  1.1  christos \name:
      6  1.1  christos 	.endm
      7  1.1  christos 
      8  1.1  christos 	comment "subroutine prologue"
      9  1.1  christos 	.macro gdbasm_enter
     10  1.1  christos 	.frame	$30, 16, $26, 0
     11  1.1  christos 	.mask	0x04000000, -16
     12  1.1  christos 	ldgp	$gp, 0($27)
     13  1.1  christos 	subq	$sp, 16, $sp
     14  1.1  christos 	stq	$26, 0($sp)
     15  1.1  christos 	.prologue 1
     16  1.1  christos 	.endm
     17  1.1  christos 
     18  1.1  christos 	comment "subroutine epilogue"
     19  1.1  christos 	.macro gdbasm_leave
     20  1.1  christos 	ldq	$26, 0($sp)
     21  1.1  christos 	addq	$sp, 16, $sp
     22  1.1  christos 	ret
     23  1.1  christos 	.endm
     24  1.1  christos 
     25  1.1  christos 	comment "subroutine end"
     26  1.1  christos 	.purgem gdbasm_end
     27  1.1  christos 	.macro gdbasm_end name
     28  1.1  christos 	.end	\name
     29  1.1  christos 	.endm
     30  1.1  christos 
     31  1.1  christos 	comment "subroutine call"
     32  1.1  christos 	/* Can't use ldgp here because the finish-frame test expects the
     33  1.1  christos 	   pc to wind up on the next line.  That's ok, we're all local.  */
     34  1.1  christos 	.macro gdbasm_call subr
     35  1.1  christos 	jsr	$26, \subr
     36  1.1  christos 	.endm
     37  1.1  christos 
     38  1.1  christos 	.macro gdbasm_several_nops
     39  1.1  christos 	nop
     40  1.1  christos 	nop
     41  1.1  christos 	nop
     42  1.1  christos 	nop
     43  1.1  christos 	.endm
     44  1.1  christos 
     45  1.1  christos 	comment "exit (0)"
     46  1.1  christos 	.macro gdbasm_exit0
     47  1.1  christos 	lda	$16, 0($31)
     48  1.1  christos 	lda	$0, 1($31)
     49  1.1  christos 	callsys
     50  1.1  christos 	.endm
     51  1.1  christos 
     52  1.1  christos 	comment "crt0 startup"
     53  1.1  christos 	.macro gdbasm_startup
     54  1.1  christos 	.frame	$31, 0, $31, 0
     55  1.1  christos 	.prologue
     56  1.1  christos 	ldgp	$gp, 0($27)
     57  1.1  christos 	.endm
     58  1.1  christos 
     59  1.1  christos 	comment "Declare a data variable"
     60  1.1  christos 	.purgem gdbasm_datavar
     61  1.1  christos 	.macro gdbasm_datavar name value
     62  1.1  christos 	.data
     63  1.1  christos \name:
     64  1.1  christos 	.long	\value
     65  1.1  christos 	.endm
     66