1 /* libunwind - a platform-independent unwind library
2 Copyright (C) 2008 CodeSourcery
3 Copyright (C) 2014 Tilera Corp.
5 This file is part of libunwind.
7 Permission is hereby granted, free of charge, to any person obtaining
8 a copy of this software and associated documentation files (the
9 "Software"), to deal in the Software without restriction, including
10 without limitation the rights to use, copy, modify, merge, publish,
11 distribute, sublicense, and/or sell copies of the Software, and to
12 permit persons to whom the Software is furnished to do so, subject to
13 the following conditions:
15 The above copyright notice and this permission notice shall be
16 included in all copies or substantial portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29 #if defined(__cplusplus) || defined(c_plusplus)
36 #define UNW_TARGET tilegx
37 #define UNW_TARGET_TILEGX 1
39 #define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
41 /* This needs to be big enough to accommodate "struct cursor", while
42 leaving some slack for future expansion. Changing this value will
43 require recompiling all users of this library. Stack allocation is
44 relatively cheap and unwind-state copying is relatively rare, so we
45 want to err on making it rather too big than too small. */
47 #define UNW_TDEP_CURSOR_LEN 4096
49 /* The size of a "word" varies on TILEGX. This type is used for memory
50 addresses and register values. */
51 typedef uint64_t unw_word_t
;
52 typedef int64_t unw_sword_t
;
54 typedef long double unw_tdep_fpreg_t
;
115 /* FIXME: Other registers! */
118 /* For TILEGX, the CFA is the value of SP (r54) at the call site in the
122 UNW_TDEP_LAST_REG
= UNW_TILEGX_PC
,
124 UNW_TDEP_IP
= UNW_TILEGX_R55
, /* R55 is link register for Tilegx */
125 UNW_TDEP_SP
= UNW_TILEGX_R54
,
126 UNW_TDEP_EH
= UNW_TILEGX_R0
/* FIXME. */
131 UNW_TILEGX_ABI_N64
= 2
134 #define UNW_TDEP_NUM_EH_REGS 2 /* FIXME for TILEGX. */
136 typedef struct unw_tdep_save_loc
138 /* Additional target-dependent info on a save location. */
139 } unw_tdep_save_loc_t
;
141 typedef ucontext_t unw_tdep_context_t
;
143 #include "libunwind-dynamic.h"
147 /* no tilegx-specific auxiliary proc-info */
148 } unw_tdep_proc_info_t
;
150 #include "libunwind-common.h"
152 #define unw_tdep_getcontext getcontext
154 #define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
155 extern int unw_tdep_is_fpreg (int);
157 #if defined(__cplusplus) || defined(c_plusplus)
161 #endif /* LIBUNWIND_H */