diff options
Diffstat (limited to 'debug/programs/step.S')
| -rw-r--r-- | debug/programs/step.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debug/programs/step.S b/debug/programs/step.S new file mode 100644 index 0000000..6601548 --- /dev/null +++ b/debug/programs/step.S @@ -0,0 +1,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 |
