aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/Linux-arm-asm.s
diff options
context:
space:
mode:
authorNeven Sajko <nsajko@gmail.com>2020-02-11 09:18:57 +0000
committerDan Cross <crossd@gmail.com>2020-02-11 06:58:26 -0500
commit0237dec768a4ee36ae9e18ce8566d2c999d78410 (patch)
tree6838c49461161424bd954dad85366527383601a4 /src/libthread/Linux-arm-asm.s
parentf66f0a587b48337388296c8f1820f9b3dbfd0085 (diff)
downloadplan9port-0237dec768a4ee36ae9e18ce8566d2c999d78410.tar.gz
plan9port-0237dec768a4ee36ae9e18ce8566d2c999d78410.tar.bz2
plan9port-0237dec768a4ee36ae9e18ce8566d2c999d78410.zip
libthread: fix ARM build by renaming file
Fixes #363 Change-Id: Ic8ad5ccce3935fdf00732d78d3024b535db90447
Diffstat (limited to 'src/libthread/Linux-arm-asm.s')
-rw-r--r--src/libthread/Linux-arm-asm.s41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/libthread/Linux-arm-asm.s b/src/libthread/Linux-arm-asm.s
new file mode 100644
index 00000000..9bd54f8a
--- /dev/null
+++ b/src/libthread/Linux-arm-asm.s
@@ -0,0 +1,41 @@
+.globl mygetmcontext
+mygetmcontext:
+ str r1, [r0,#4]
+ str r2, [r0,#8]
+ str r3, [r0,#12]
+ str r4, [r0,#16]
+ str r5, [r0,#20]
+ str r6, [r0,#24]
+ str r7, [r0,#28]
+ str r8, [r0,#32]
+ str r9, [r0,#36]
+ str r10, [r0,#40]
+ str r11, [r0,#44]
+ str r12, [r0,#48]
+ str r13, [r0,#52]
+ str r14, [r0,#56]
+ /* store 1 as r0-to-restore */
+ mov r1, #1
+ str r1, [r0]
+ /* return 0 */
+ mov r0, #0
+ mov pc, lr
+
+.globl mysetmcontext
+mysetmcontext:
+ ldr r1, [r0,#4]
+ ldr r2, [r0,#8]
+ ldr r3, [r0,#12]
+ ldr r4, [r0,#16]
+ ldr r5, [r0,#20]
+ ldr r6, [r0,#24]
+ ldr r7, [r0,#28]
+ ldr r8, [r0,#32]
+ ldr r9, [r0,#36]
+ ldr r10, [r0,#40]
+ ldr r11, [r0,#44]
+ ldr r12, [r0,#48]
+ ldr r13, [r0,#52]
+ ldr r14, [r0,#56]
+ ldr r0, [r0]
+ mov pc, lr