aboutsummaryrefslogtreecommitdiff
path: root/debug/programs/step.S
blob: 6601548a5614fe158693dbbb3464a6f1b0dd9fc7 (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
// Test stepping over a variety of instructions.

        .global main

main:
        la      t0, trap_entry          // 0, 4
        csrw    mtvec, t0               // 0x8

        li      t0, 5                   // 0xc
        beq     zero, zero, one         // 0x10
        nop                             // 0x14
one:
        beq     zero, t0, one           // 0x18
        jal     two                     // 0x1c

three:
        .word   0                       // 0x20
        nop                             // 0x24

two:
        ret                             // 0x28

trap_entry:
        j       trap_entry              // 0x2c