about summary refs log tree commit diff
path: root/src/thread/sh/__unmapself_mmu.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-01-22 03:46:00 +0000
committerRich Felker <dalias@aerifal.cx>2016-01-22 03:46:00 +0000
commit230bfe1a7d46c85601e5e67497cc607e15d08990 (patch)
treed32ce0ad04642eba164925cef9bfe10cfc942936 /src/thread/sh/__unmapself_mmu.s
parent66215afc2e09f0153a63d58d3baec25cf0122b7b (diff)
downloadmusl-230bfe1a7d46c85601e5e67497cc607e15d08990.tar.gz
musl-230bfe1a7d46c85601e5e67497cc607e15d08990.tar.xz
musl-230bfe1a7d46c85601e5e67497cc607e15d08990.zip
move sh __unmapself code from arch/sh/src to main src tree
Diffstat (limited to 'src/thread/sh/__unmapself_mmu.s')
-rw-r--r--src/thread/sh/__unmapself_mmu.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/thread/sh/__unmapself_mmu.s b/src/thread/sh/__unmapself_mmu.s
new file mode 100644
index 00000000..0161d53d
--- /dev/null
+++ b/src/thread/sh/__unmapself_mmu.s
@@ -0,0 +1,22 @@
+.text
+.global __unmapself_sh_mmu
+.type   __unmapself_sh_mmu, @function
+__unmapself_sh_mmu:
+	mov   #91, r3  ! SYS_munmap
+	trapa #31
+
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0
+
+	mov   #1, r3   ! SYS_exit
+	mov   #0, r4
+	trapa #31
+
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0
+	or    r0, r0