-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Imlpemented RTI. Testing RTS and FIXED test for BL.
- Loading branch information
Showing
8 changed files
with
48 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#include "epiphany-macros.h" | ||
SET_UP | ||
; Temporary register - r14 | ||
; Function argument - r15 | ||
; Function return - r16 | ||
mov r15, #5 | ||
mov r16, #0 | ||
; Temporary register - r0 | ||
; Function argument - r1 | ||
; Function return - r2 | ||
mov r1, #5 | ||
mov r2, #0 | ||
bl _my_func ; save PC to LR and jump to _my_func | ||
TEAR_DOWN ; Sets breakpoint. | ||
b _end | ||
_my_func: | ||
mov r14, #0 | ||
mov r16, #0 | ||
mov r0, #0 | ||
mov r2, #0 | ||
_loop: | ||
add r14, r14, r15 | ||
sub r15, r15, #1 | ||
add r0, r0, r1 | ||
sub r1, r1, #1 | ||
bne _loop | ||
add r16, r16, r14 | ||
rts ; branch back to callee | ||
add r2, r0, #0 | ||
rts ; branch back to callee | ||
_end: | ||
TEAR_DOWN ; Sets breakpoint. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
#include "epiphany-macros.h" | ||
SET_UP | ||
rts | ||
bl _my_func ; save PC to LR and jump to _my_func | ||
nop | ||
nop | ||
nop | ||
b _end | ||
_my_func: | ||
mov r1, #100 | ||
mov r2, #200 | ||
add r3, r1, r2 | ||
rts ; branch back to callee | ||
_end: | ||
TEAR_DOWN |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters