aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.asm/v850.inc
blob: 87977919f0c91ed20ad6e06821813f6e931d8b4a (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
	comment "subroutine prologue"
	.macro gdbasm_enter
	add -8,sp
	st.w r31,4[sp]
	st.w r29,0[sp]
	mov sp,r29
	.endm

	comment "subroutine epilogue"
	.macro gdbasm_leave
	mov r29,sp
	ld.w 0[sp],r29
	ld.w 4[sp],r31
	add 8,sp
	jmp [r31]
	.endm

	.macro gdbasm_call subr
	jarl \subr,r31
	.endm

	.macro gdbasm_several_nops
	nop
	nop
	nop
	nop
	.endm

	comment "exit (0)"
	.macro gdbasm_exit0
	halt
	.endm

	comment "crt0 startup"
	.macro gdbasm_startup
	movea 255,r0,r20
	mov r0, r21
	ori 65535, r0, r21
	movhi 32, r0, sp
	.endm