Linus Nielsen Feltzing | 1dc42d1 | 2003-05-17 00:31:50 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2002 by Red Hat Inc |
| 11 | * |
| 12 | * All files in this archive are subject to the GNU General Public License. |
| 13 | * See the file COPYING in the source tree root for full license agreement. |
| 14 | * |
| 15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 16 | * KIND, either express or implied. |
| 17 | * |
| 18 | ****************************************************************************/ |
| 19 | .type _setjmp,@function |
| 20 | .global _setjmp |
| 21 | _setjmp: |
| 22 | add #(9*4),r4 |
| 23 | |
| 24 | sts.l pr,@-r4 |
| 25 | |
| 26 | mov.l r15,@-r4 |
| 27 | mov.l r14,@-r4 |
| 28 | mov.l r13,@-r4 |
| 29 | mov.l r12,@-r4 |
| 30 | |
| 31 | mov.l r11,@-r4 |
| 32 | mov.l r10,@-r4 |
| 33 | mov.l r9,@-r4 |
| 34 | mov.l r8,@-r4 |
| 35 | |
| 36 | rts |
| 37 | mov #0,r0 |
| 38 | |
| 39 | .type _longjmp,@function |
| 40 | .global _longjmp |
| 41 | _longjmp: |
| 42 | mov.l @r4+,r8 |
| 43 | mov.l @r4+,r9 |
| 44 | mov.l @r4+,r10 |
| 45 | mov.l @r4+,r11 |
| 46 | |
| 47 | mov.l @r4+,r12 |
| 48 | mov.l @r4+,r13 |
| 49 | mov.l @r4+,r14 |
| 50 | mov.l @r4+,r15 |
| 51 | |
| 52 | lds.l @r4+,pr |
| 53 | |
| 54 | mov r5,r0 |
| 55 | tst r0,r0 |
| 56 | bf retr4 |
| 57 | movt r0 |
| 58 | retr4: rts |
| 59 | nop |