From e0ba2e06ace89f0e17dd912e684f91c5a7f28f7c Mon Sep 17 00:00:00 2001
From: Christian Cunningham <cc@localhost>
Date: Sat, 5 Feb 2022 12:40:47 -0700
Subject: Fixed SPSR preservation

---
 src/tests/test.S | 10 ++++++++++
 src/tests/test.c |  6 ++++++
 2 files changed, 16 insertions(+)
 create mode 100644 src/tests/test.S

(limited to 'src/tests')

diff --git a/src/tests/test.S b/src/tests/test.S
new file mode 100644
index 0000000..ebb901c
--- /dev/null
+++ b/src/tests/test.S
@@ -0,0 +1,10 @@
+.section .text
+
+btest:
+	push {lr}
+	pop {pc}
+
+.globl atest
+atest:
+	push {lr}
+	pop {pc}
diff --git a/src/tests/test.c b/src/tests/test.c
index f2f3e6b..3903d95 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -3,6 +3,9 @@
 #include <graphics/lfb.h>
 #include <lib/kmem.h>
 #include <sys/core.h>
+#include <sys/schedule.h>
+
+extern void atest(void);
 
 void test_entry(void)
 {
@@ -15,4 +18,7 @@ void test_entry(void)
 	}
 	DRAW64(0, 19, dt/64);
 	DRAW64(17, 19, dt%64);
+
+	// atest
+	add_thread(atest, 0, 0);
 }
-- 
cgit v1.2.1