summaryrefslogtreecommitdiff
path: root/tb/sim/subword.S
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-16 00:14:47 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-16 00:29:28 -0600
commit743b5ca25567199b95018127606c0ebaa56ad24c (patch)
tree311e5fc62519e3213180c7f8d120bd1c0461096b /tb/sim/subword.S
parent86903ec40acd3014861d856660a27f6a131d8ca3 (diff)
Add sim test: subword
Diffstat (limited to 'tb/sim/subword.S')
-rw-r--r--tb/sim/subword.S16
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