summaryrefslogtreecommitdiff
path: root/src/cmd/tests/kernel/misc.c
diff options
context:
space:
mode:
authordzwdz2024-07-22 21:48:03 +0200
committerdzwdz2024-07-22 21:48:03 +0200
commita6fabfb78e70b8096a8bf336aa64a3358a2f5eca (patch)
treeefd544588d4de22dd59bf006217beddf5381ad62 /src/cmd/tests/kernel/misc.c
parent2be2236e99e5aed779b820b540d72dffb47da406 (diff)
tests: check if SSE registers are preserved on context switches
Diffstat (limited to 'src/cmd/tests/kernel/misc.c')
-rw-r--r--src/cmd/tests/kernel/misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/tests/kernel/misc.c b/src/cmd/tests/kernel/misc.c
index 7fc0866..d25e3dd 100644
--- a/src/cmd/tests/kernel/misc.c
+++ b/src/cmd/tests/kernel/misc.c
@@ -60,8 +60,18 @@ static void test_invalid_syscall(void) {
test(_syscall(~0, 0, 0, 0, 0, 0) < 0);
}
+extern void _sse_test(void *a);
+static void test_sse_restore(void) {
+ char buf[128] = "Hello world";
+ char buf2[128];
+ memcpy(buf2, buf, 128);
+ _sse_test(&buf);
+ test(memcmp(buf, buf2, 128) == 0);
+}
+
void r_k_misc(void) {
run_test(test_fault_kill);
run_test(test_efault);
run_test(test_invalid_syscall);
+ run_test(test_sse_restore);
}