* gdb.asm/asm-source.exp: Update copyright year. Link statically
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.asm / d10v.inc
CommitLineData
c906108c 1 comment "subroutine prologue"
45b074e1 2 .macro gdbasm_enter
ca9efc90 3 st r11,@-sp
c906108c 4 st r13,@-sp
ca9efc90 5 mv r11,sp
c906108c
SS
6 .endm
7
8 comment "subroutine epilogue"
45b074e1 9 .macro gdbasm_leave
ca9efc90
MS
10 add3 sp,r11,0
11 ld r13,@sp+
12 ld r11,@sp+
13 jmp r13
c906108c
SS
14 .endm
15
45b074e1 16 .macro gdbasm_call subr
c906108c
SS
17 bl \subr
18 .endm
19
45b074e1 20 .macro gdbasm_several_nops
c906108c
SS
21 nop
22 nop
23 nop
24 nop
25 .endm
26
27 comment "exit (0)"
45b074e1 28 .macro gdbasm_exit0
c906108c
SS
29 ldi r4, 1
30 ldi r0, 0
31 trap 15
32 .endm
78492fde
AC
33
34 comment "crt0 startup"
45b074e1 35 .macro gdbasm_startup
ca9efc90
MS
36; R14 always contains memory base address (0)
37
38 ldi r14,0
39
40; Set the USER and SYSTEM stack pointers.
41
42 ldi r0, 0 ; zero arguments
43 ldi r1, 0
44 mvtc r0, psw ; select SPI and set it
45 ldi sp, _stack
46 ldi r10, 0x8000 ; select SPU/FP and set it
47 mvtc r10, psw || ldi r11, 0; clear stack frame
48 ldi sp, _stack - 0x200
49 ldi r13, 0
50
51 st r11, @-sp
52 st r13, @-sp
53; mv r11, sp
54
78492fde 55 .endm
This page took 0.377635 seconds and 4 git commands to generate.