kernels/linux-2.4.0/arch/ia64/kernel/unwind.c
/*
 * On entry, info->regstk.top should point to the register backing
 * store for r32.
 */
On entry, info->regstk.top should point to the register backing
store for r32.
On entry info - > regstk . top should point to the register backing store for r32 .
int
unw_unwind (struct unw_frame_info *info)
{
	unsigned long sol, cfm = *info->cfm_loc;
	int is_nat;
	sol = (cfm >> 7) & 0x7f;	
	if (sol < 2)
		return -1;
	info->ip = read_reg(info, sol - 2, &is_nat);
	if (is_nat || (info->ip & (my_cpu_data.unimpl_va_mask | 0xf)))
		return -1;
	info->cfm_loc = ia64_rse_skip_regs((unsigned long *) info->bsp, sol - 1);
	cfm = read_reg(info, sol - 1, &is_nat);
	if (is_nat)
		return -1;
	sol = (cfm >> 7) & 0x7f;
	info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->bsp, -sol);
	return 0;
}
int unw_unwind ( struct unw_frame_info * info ) { unsigned long sol , cfm = * info -> cfm_loc ; int is_nat ; sol = ( cfm >> 7 ) & 0x7f ; if ( sol < 2 ) return -1 ; info -> ip = read_reg ( info , sol - 2 , & is_nat ) ; if ( is_nat || ( info -> ip & ( my_cpu_data . unimpl_va_mask | 0xf ) ) ) return -1 ; info -> cfm_loc = ia64_rse_skip_regs ( ( unsigned long * ) info -> bsp , sol - 1 ) ; cfm = read_reg ( info , sol - 1 , & is_nat ) ; if ( is_nat ) return -1 ; sol = ( cfm >> 7 ) & 0x7f ; info -> bsp = ( unsigned long ) ia64_rse_skip_regs ( ( unsigned long * ) info -> bsp , - sol ) ; return 0 ; }
On entry, info->regstk.top should point to the register backing
 store for r32.
On entry info - > regstk . top should point to the register backing store for r32 .
/* size of locals */ /*
	 * In general, we would have to make use of unwind info to
	 * unwind an IA-64 stack, but for now gcc uses a special
	 * convention that makes this possible without full-fledged
	 * unwindo info.  Specifically, we expect "rp" in the second
	 * last, and "ar.pfs" in the last local register, so the
	 * number of locals in a frame must be at least two.  If it's
	 * less than that, we reached the end of the C call stack.
	 */ /* reject let obviously bad addresses */