2N/A/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc. 2N/A Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. 2N/A The GNU C Library is free software; you can redistribute it and/or 2N/A modify it under the terms of the GNU Lesser General Public 2N/A License as published by the Free Software Foundation; either 2N/A version 2.1 of the License, or (at your option) any later version. 2N/A The GNU C Library is distributed in the hope that it will be useful, 2N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2N/A Lesser General Public License for more details. 2N/A You should have received a copy of the GNU Lesser General Public 2N/A License along with the GNU C Library; if not, write to the Free 2N/A Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 2N/A Note that __sigsetjmp() did NOT flush the register stack. Instead, 2N/A we do it here since __longjmp() is usually much less frequently 2N/A invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp() 2N/A didn't (and wouldn't be able to) save ar.rnat either. This is a problem 2N/A because if we're not careful, we could end up loading random NaT bits. 2N/A There are two cases: 2N/A (i) ar.bsp < ia64_rse_rnat_addr(jmpbuf.ar_bsp) 2N/A ar.rnat contains the desired bits---preserve ar.rnat 2N/A across loadrs and write to ar.bspstore 2N/A (ii) ar.bsp >= ia64_rse_rnat_addr(jmpbuf.ar_bsp) 2N/A The desired ar.rnat is stored in 2N/A ia64_rse_rnat_addr(jmpbuf.ar_bsp). Load those 2N/A bits into ar.rnat after setting ar.bspstore. */ 2N/A#
define pPos p6 /* is rotate count positive? */ 2N/A#
define pNeg p7 /* is rotate count negative? */ 2N/A /* __longjmp(__jmp_buf buf, int val) */ 2N/A flushrs // flush dirty regs to backing store (must be first in insn grp) 2N/A extr.u
r8=
r8,
3,
6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f 2N/A dep r11=-
1,
r23,
3,
6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) 2N/A invala // virt. -> phys. regnum mapping may change