aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.asm/spu.inc
blob: aabceb845d24ffb10c9305b36b3d8e3ad2022479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	comment "subroutine prologue"
	.macro gdbasm_enter
	stqd    $lr, 16($sp)
	stqd    $sp, -32($sp)
	ai      $sp, $sp, -32
	.endm

	comment "subroutine epilogue"
	.macro gdbasm_leave
	ai	$sp, $sp, 32
	lqd     $lr, 16($sp)
	bi	$lr	
	.endm

	.macro gdbasm_call subr
	brsl	$lr, \subr
	.endm

	.macro gdbasm_several_nops
	nop
	nop
	nop
	nop
	.endm

	comment "exit (0)"
	.macro gdbasm_exit0
	stop	0x2000
	stop 
	stop 
	stop 
	.endm

	comment "startup"
	.macro gdbasm_startup
	il	$0, 0
	ila	$sp, 16368
	stqd	$0, 0($sp)
	stqd	$sp, -32($sp)
	ai	$sp, $sp, -32
	stqd	$0, 16($sp)
	.endm