diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-16 00:14:47 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-16 00:29:28 -0600 |
| commit | 743b5ca25567199b95018127606c0ebaa56ad24c (patch) | |
| tree | 311e5fc62519e3213180c7f8d120bd1c0461096b /tb/sim/subword.S | |
| parent | 86903ec40acd3014861d856660a27f6a131d8ca3 (diff) | |
Add sim test: subword
Diffstat (limited to 'tb/sim/subword.S')
| -rw-r--r-- | tb/sim/subword.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tb/sim/subword.S b/tb/sim/subword.S new file mode 100644 index 0000000..82604ae --- /dev/null +++ b/tb/sim/subword.S @@ -0,0 +1,16 @@ +.global reset + +reset: + ldr r0, =0x01234567 + push {r0} + ldr r0, =0x89ab + ldrb r1, [sp, #2] + strh r0, [sp, #2] + mov r2, #0xcd + strb r2, [sp] + ldr r0, [sp] + ldrsb r2, [sp] + ldrb r3, [sp] + ldrsb r4, [sp, #1]! + ldrsh r5, [sp, #1] + mov pc, lr |
