summaryrefslogtreecommitdiff
path: root/tb
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-10-03 18:56:36 -0600
committerAlejandro Soto <alejandro@34project.org>2023-10-03 18:56:36 -0600
commit1094451235282af6a9daba2b2a460577f82d289c (patch)
tree336e1168c087395d22e0aafe03a58c5afeb58c6f /tb
parentb0f56144be04db7f62ac30107e392a7902b6fd39 (diff)
tb/sim/strex: test monitor after exception
Diffstat (limited to 'tb')
-rw-r--r--tb/sim/strex.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/tb/sim/strex.S b/tb/sim/strex.S
index 5ea2b33..575a839 100644
--- a/tb/sim/strex.S
+++ b/tb/sim/strex.S
@@ -6,6 +6,9 @@ reset:
str r1, [r0]
mvn r1, r1
str r1, [r0, #4]
+ mov r12, lr
+ swi #0
+ mov lr, r12
strex r2, r0, [r0] @ Debe fallar
ldrex r3, [r0]
add r0, r0, #4
@@ -14,3 +17,7 @@ reset:
sub r0, r0, #4
strex r6, r4, [r0] @ Debe servir
mov pc, lr
+
+.global swi
+swi:
+ movs pc, lr