]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/d30v-elf/os-dbt.S
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / sim / testsuite / d30v-elf / os-dbt.S
1 .globl _start
2 #
3 # NOTE: Registers r10-r11 are reserved for the interrupt handler
4 # while the others can be used by the main loop/start code.
5
6 _start:
7 # patch the DBT handler
8 add r1, r0, handler
9 ldw r2, @(r1, 0)
10 ldw r3, @(r1, 4)
11 # DBT vector address
12 add r1, r0, 0xfffff120
13 stw r2, @(r1, 0)
14 stw r3, @(r1, 4)
15
16 # try out the breakpoint/return
17 add r2, r0, 47
18 #dbt
19 nop
20 .long 0x00b00000
21 nop
22
23 # exit with what ever the breakpoint hander set r2 to.
24 nop
25 .long 0x0e000004
26 nop
27
28 handler:
29 jmp real_handler
30
31 # The Breakpoint handler sets r2 to 0 if PSW was set correctly.
32 real_handler:
33 mvfsys r2, cr0
34 sub r2, r0, 0x08000000
35 #rtd
36 nop
37 .long 0x00a00000
38 nop