summaryrefslogtreecommitdiff
path: root/newlib/libc/machine/necv70/setjmp.s
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:38:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-15 09:39:34 -0500
commitf95a4a932476be2ba99e2fd081e8d2bc6ea12813 (patch)
tree75f67192cb2d7b7b575c94edda318e475239b63c /newlib/libc/machine/necv70/setjmp.s
parentf60aca96985e68c7d8a52eb7bc955fb80e132f73 (diff)
Import newlib and create makefile
Diffstat (limited to 'newlib/libc/machine/necv70/setjmp.s')
-rw-r--r--newlib/libc/machine/necv70/setjmp.s33
1 files changed, 33 insertions, 0 deletions
diff --git a/newlib/libc/machine/necv70/setjmp.s b/newlib/libc/machine/necv70/setjmp.s
new file mode 100644
index 0000000..d8aca1d
--- /dev/null
+++ b/newlib/libc/machine/necv70/setjmp.s
@@ -0,0 +1,33 @@
+ .globl _setjmp
+_setjmp:
+ mov.w [ap],r0
+ mov.d r15,[r0+]
+ mov.d r17,[r0+]
+ mov.d r19,[r0+]
+ mov.d r21,[r0+]
+ mov.d r23,[r0+]
+ mov.w -0x4[ap],[r0+]
+ mov.w fp,[r0+]
+ mov.w ap,[r0+]
+ mov.w -0x8[ap],[r0]
+ xor.w r0,r0
+ ret #0x0
+
+ .globl _longjmp
+_longjmp:
+ mov.w 0x4[ap],r0
+ mov.w [ap],r1
+ mov.d [r1+],r15
+ mov.d [r1+],r17
+ mov.d [r1+],r19
+ mov.d [r1+],r21
+ mov.d [r1+],r23
+ mov.d [r1+],ap
+ mov.w [r1+],sp
+ test.w r0
+ jne noz
+ mov.w #0x1,r0
+noz: jmp [0x0[r1]]
+
+
+