1/* libunwind - a platform-independent unwind library 2 Copyright (C) 2004 Hewlett-Packard Co 3 Contributed by David Mosberger-Tang <davidm@hpl.hp.com> 4 5This file is part of libunwind. 6 7Permission is hereby granted, free of charge, to any person obtaining 8a copy of this software and associated documentation files (the 9"Software"), to deal in the Software without restriction, including 10without limitation the rights to use, copy, modify, merge, publish, 11distribute, sublicense, and/or sell copies of the Software, and to 12permit persons to whom the Software is furnished to do so, subject to 13the following conditions: 14 15The above copyright notice and this permission notice shall be 16included in all copies or substantial portions of the Software. 17 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 25 26#define SPILL(n) stw %r##n, (LINUX_UC_MCONTEXT_OFF+LINUX_SC_GR_OFF+4*(n))(%r26) 27 28#include "offsets.h" 29 30 .align 4 31 .protected _Uhppa_getcontext 32 .global _Uhppa_getcontext 33 .proc 34 .callinfo 35_Uhppa_getcontext: 36 SPILL (2) /* return-pointer */ 37 SPILL (3) /* frame pointer */ 38 SPILL (4) /* 2nd-ary frame pointer */ 39 SPILL (5) /* preserved register */ 40 SPILL (6) /* preserved register */ 41 SPILL (7) /* preserved register */ 42 SPILL (8) /* preserved register */ 43 SPILL (9) /* preserved register */ 44 SPILL (10) /* preserved register */ 45 SPILL (11) /* preserved register */ 46 SPILL (12) /* preserved register */ 47 SPILL (13) /* preserved register */ 48 SPILL (14) /* preserved register */ 49 SPILL (15) /* preserved register */ 50 SPILL (16) /* preserved register */ 51 SPILL (17) /* preserved register */ 52 SPILL (18) /* preserved register */ 53 SPILL (19) /* linkage-table register */ 54 SPILL (27) /* global-data pointer */ 55 SPILL (30) /* stack pointer */ 56 57 ldo (LINUX_UC_MCONTEXT_OFF+LINUX_SC_FR_OFF)(%r26), %r29 58 fstds,ma %fr12, 8(%r29) 59 fstds,ma %fr13, 8(%r29) 60 fstds,ma %fr14, 8(%r29) 61 fstds,ma %fr15, 8(%r29) 62 fstds,ma %fr16, 8(%r29) 63 fstds,ma %fr17, 8(%r29) 64 fstds,ma %fr18, 8(%r29) 65 fstds,ma %fr19, 8(%r29) 66 fstds,ma %fr20, 8(%r29) 67 fstds %fr21, 8(%r29) 68 69 bv,n %r0(%rp) 70 .procend 71#ifdef __linux__ 72 /* We do not need executable stack. */ 73 .section .note.GNU-stack,"",@progbits 74#endif 75