~ubuntu-branches/ubuntu/utopic/cdrdao/utopic

« back to all changes in this revision

Viewing changes to scsilib/libschily/setfp.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Suffield
  • Date: 2004-06-24 22:33:16 UTC
  • Revision ID: james.westby@ubuntu.com-20040624223316-534onzugaeeyq61j
Tags: upstream-1.1.9
ImportĀ upstreamĀ versionĀ 1.1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)setfp.c  1.11 03/07/13 Copyright 1988, 1995-2003 J. Schilling */
 
2
/*
 
3
 *      Set frame pointer
 
4
 *
 
5
 *      Copyright (c) 1988, 1995-2003 J. Schilling
 
6
 */
 
7
/*
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2, or (at your option)
 
11
 * any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License along with
 
19
 * this program; see the file COPYING.  If not, write to the Free Software
 
20
 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
21
 */
 
22
 
 
23
#include <mconfig.h>
 
24
#include <standard.h>
 
25
#include <avoffset.h>
 
26
#include <schily.h>
 
27
 
 
28
#if     !defined(AV_OFFSET) || !defined(FP_INDIR)
 
29
#       ifdef   HAVE_SCANSTACK
 
30
#       undef   HAVE_SCANSTACK
 
31
#       endif
 
32
#endif
 
33
 
 
34
#       ifdef   HAVE_SCANSTACK
 
35
#include <stkframe.h>
 
36
 
 
37
#define MAXWINDOWS      32
 
38
#define NWINDOWS        7
 
39
 
 
40
extern  void    **___fpoff      __PR((char *cp));
 
41
 
 
42
EXPORT void
 
43
setfp(fp)
 
44
        void    * const *fp;
 
45
{
 
46
                long    **dummy[1];
 
47
 
 
48
#ifdef  sparc
 
49
        flush_reg_windows(MAXWINDOWS-2);
 
50
#endif
 
51
        *(long ***)(&((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp) =
 
52
                                                                (long **)fp;
 
53
#ifdef  sparc
 
54
        flush_reg_windows(MAXWINDOWS-2);
 
55
#endif
 
56
}
 
57
 
 
58
#else
 
59
 
 
60
EXPORT void
 
61
setfp(fp)
 
62
        void    * const *fp;
 
63
{
 
64
        raisecond("setfp_not_implemented", 0L);
 
65
}
 
66
 
 
67
#endif