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/* These are predefined by new versions of GNU cpp. */ 18 19#ifndef __USER_LABEL_PREFIX__ 20#define __USER_LABEL_PREFIX__ _ 21#endif 22 23/* ANSI concatenation macros. */ 24 25#define CONCAT1(a, b) CONCAT2(a, b) 26#define CONCAT2(a, b) a ## b 27 28/* Use the right prefix for global labels. */ 29 30#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) 31 32 .global SYM (setjmp) 33 .global SYM (_setjmp) 34 .global SYM (longjmp) 35 36 .section .text,"x" 37 .align 4 38SYM (_setjmp): 39SYM (setjmp): 40 st.d 0(r2),r20 41 st.d 8(r2),r22 42 st.d 16(r2),r24 43 st.d 24(r2),r26 44 st.d 32(r2),r28 45 st.d 40(r2),r30 46 st 48(r2),r1 47 jsr r31(r0),r0 48 addu 0,r0,r2 49 50 .section .text,"x" 51 .align 4 52SYM (longjmp): 53 ld.d 0(r2),r20 54 ld.d 8(r2),r22 55 ld.d 16(r2),r24 56 ld.d 24(r2),r26 57 ld.d 32(r2),r28 58 ld.d 40(r2),r30 59 bcnd L1,r4,ne0.w 60 ld 48(r2),r1 61 62 jsr r31(r0),r0 63 addu 1,r0,r2 64L1: 65 jsr r31(r0),r0 66 addu r4,r0,r2 67