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 .file "setjmp.S" 18 19 .section .text 20 .align 1 21 .global _setjmp 22_setjmp: 23 mov d0,a0 24 movx d2,(0,a0) 25 movx d3,(4,a0) 26 mov a1,(8,a0) 27 mov a2,(12,a0) 28 mov a3,(16,a0) 29 movx (0,a3),d0 30 movx d0,(20,a0) 31 sub d0,d0 32 rts 33 34 .global _longjmp 35_longjmp: 36 mov d0,a0 37 movx (0,a0),d2 38 movx (4,a0),d3 39 mov (8,a0),a1 40 mov (12,a0),a2 41 mov (16,a0),a3 42 movx (20,a0),d0 43 movx d0,(0,a3) 44 cmp 0,d1 45 bne L1 46 mov 1,d1 47L1: 48 mov d1,d0 49 rts 50