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 .file "setjmp.S" 20 21 .section .text 22 .align 1 23 .global _setjmp 24_setjmp: 25 st.w r1,0[r6] 26 st.w r3,4[r6] 27 st.w r4,8[r6] 28 st.w r20,12[r6] 29 st.w r21,16[r6] 30 st.w r22,20[r6] 31 st.w r23,24[r6] 32 st.w r24,28[r6] 33 st.w r25,32[r6] 34 st.w r26,36[r6] 35 st.w r27,40[r6] 36 st.w r28,44[r6] 37 st.w r29,48[r6] 38 st.w r30,52[r6] 39 st.w r31,56[r6] 40 mov r0, r10 41 jmp [r31] 42 43 .global _longjmp 44_longjmp: 45 ld.w 0[r6],r1 46 ld.w 4[r6],r3 47 ld.w 8[r6],r4 48 ld.w 12[r6],r20 49 ld.w 16[r6],r21 50 ld.w 20[r6],r22 51 ld.w 24[r6],r23 52 ld.w 28[r6],r24 53 ld.w 32[r6],r25 54 ld.w 36[r6],r26 55 ld.w 40[r6],r27 56 ld.w 44[r6],r28 57 ld.w 48[r6],r29 58 ld.w 52[r6],r30 59 ld.w 56[r6],r31 60 cmp r7, r0 61 jne 1f 62 mov 1,r7 631: 64 mov r7, r10 65 jmp [r31] 66