diff options
Diffstat (limited to 'tb/sim/stack.S')
| -rw-r--r-- | tb/sim/stack.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tb/sim/stack.S b/tb/sim/stack.S new file mode 100644 index 0000000..f1bc0a8 --- /dev/null +++ b/tb/sim/stack.S @@ -0,0 +1,20 @@ +.global reset +reset: + ldr r0, =stub1 + ldr r1, =stub2 + push {r0, r1, lr} + mov r2, sp + pop {r5, pc} + +stub1: + ldr r0, =0x01234567 + pop {pc} + +stub2: + mov r3, sp + ldr r1, =0x89abcdef + push {r5} + mov r4, sp + pop {lr} + mov r5, sp + mov pc, lr |
