OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgcc/] [config/] [c6x/] [unwind-c6x.h] - Blame information for rev 849

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 734 jeremybenn
/* Header file for the C6X EABI unwinder
2
   Copyright (C) 2011
3
   Free Software Foundation, Inc.
4
 
5
   This file is free software; you can redistribute it and/or modify it
6
   under the terms of the GNU General Public License as published by the
7
   Free Software Foundation; either version 3, or (at your option) any
8
   later version.
9
 
10
   This file is distributed in the hope that it will be useful, but
11
   WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
   General Public License for more details.
14
 
15
   Under Section 7 of GPL version 3, you are granted additional
16
   permissions described in the GCC Runtime Library Exception, version
17
   3.1, as published by the Free Software Foundation.
18
 
19
   You should have received a copy of the GNU General Public License and
20
   a copy of the GCC Runtime Library Exception along with this program;
21
   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
22
   <http://www.gnu.org/licenses/>.  */
23
 
24
/* Language-independent unwinder header public defines.  This contains both
25
   ABI defined objects, and GNU support routines.  */
26
 
27
#ifndef UNWIND_C6X_H
28
#define UNWIND_C6X_H
29
 
30
/* Not really the ARM EABI, but pretty close.  */
31
#include "unwind-arm-common.h"
32
 
33
#define UNWIND_STACK_REG 31
34
/* Use A0 as a scratch register within the personality routine.  */
35
#define UNWIND_POINTER_REG 0
36
 
37
#ifdef __cplusplus
38
extern "C" {
39
#endif
40
  _Unwind_Reason_Code __gnu_unwind_24bit (_Unwind_Context *, _uw, int);
41
 
42
  /* Decode an EH table reference to a typeinfo object.  */
43
  static inline _Unwind_Word
44
  _Unwind_decode_typeinfo_ptr (_Unwind_Ptr base, _Unwind_Word ptr)
45
    {
46
      _Unwind_Word tmp;
47
 
48
      tmp = *(_Unwind_Word *) ptr;
49
      /* Zero values are always NULL.  */
50
      if (!tmp)
51
        return 0;
52
 
53
      /* SB-relative indirect.  Propagate the bottom 2 bits, which can
54
         contain referenceness information in gnu unwinding tables.  */
55
      tmp += base;
56
      tmp = *(_Unwind_Word *) (tmp & ~(_Unwind_Word)3) | (tmp & 3);
57
      return tmp;
58
    }
59
 
60
#define _Unwind_GetIP(context) \
61
  (_Unwind_GetGR (context, 33))
62
 
63
 
64
#define _Unwind_SetIP(context, val) \
65
  _Unwind_SetGR (context, 33, val)
66
 
67
#ifdef __cplusplus
68
}   /* extern "C" */
69
#endif
70
 
71
#endif /* defined UNWIND_ARM_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.