1/* 2Copyright (c) 1990 The Regents of the University of California. 3All rights reserved. 4 5Redistribution and use in source and binary forms are permitted 6provided that the above copyright notice and this paragraph are 7duplicated in all such forms and that any documentation, 8and/or other materials related to such 9distribution and use acknowledge that the software was developed 10by the University of California, Berkeley. The name of the 11University may not be used to endorse or promote products derived 12from this software without specific prior written permission. 13THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 */ 17#include <picolibc.h> 18 19 .globl _setjmp 20_setjmp: 21 mov.w [ap],r0 22 mov.d r15,[r0+] 23 mov.d r17,[r0+] 24 mov.d r19,[r0+] 25 mov.d r21,[r0+] 26 mov.d r23,[r0+] 27 mov.w -0x4[ap],[r0+] 28 mov.w fp,[r0+] 29 mov.w ap,[r0+] 30 mov.w -0x8[ap],[r0] 31 xor.w r0,r0 32 ret #0x0 33 34 .globl _longjmp 35_longjmp: 36 mov.w 0x4[ap],r0 37 mov.w [ap],r1 38 mov.d [r1+],r15 39 mov.d [r1+],r17 40 mov.d [r1+],r19 41 mov.d [r1+],r21 42 mov.d [r1+],r23 43 mov.d [r1+],ap 44 mov.w [r1+],sp 45 test.w r0 46 jne noz 47 mov.w #0x1,r0 48noz: jmp [0x0[r1]] 49 50 51 52