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! 20 .file "setjmp.S" 21 .section .text 22 23 .global _setjmp 24_setjmp: 25 mov.w r7,@r0+ 26 mov.w r6,@r0+ 27 mov.w r5,@r0+ 28 mov.w @sp,r1 29 mov.w r1,@r0 30 clr.w r0 31 rts 32 33 .global _longjmp 34_longjmp: 35 mov.w @r0+,r7 36 mov.w @r0+,r6 37 mov.w @r0+,r5 38 mov.w @r0,r2 39 mov.w r2,@sp 40 mov.w r1,r0 41 tst.w r0 42 bne .L1 43 mov.w #1,r0 44.L1: 45 rts 46