]> git.ipfire.org Git - thirdparty/gcc.git/blame - libphobos/libdruntime/gcc/unwind/c6x.d
Update copyright years.
[thirdparty/gcc.git] / libphobos / libdruntime / gcc / unwind / c6x.d
CommitLineData
b4c522fa 1// Exception handling and frame unwind runtime interface routines.
8d9254fc 2// Copyright (C) 2011-2020 Free Software Foundation, Inc.
b4c522fa
IB
3
4// GCC is free software; you can redistribute it and/or modify it under
5// the terms of the GNU General Public License as published by the Free
6// Software Foundation; either version 3, or (at your option) any later
7// version.
8
9// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10// WARRANTY; without even the implied warranty of MERCHANTABILITY or
11// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12// for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with GCC; see the file COPYING3. If not see
16// <http://www.gnu.org/licenses/>.
17
18// extern(C) interface for the C6X EABI unwinder library.
19// This corresponds to unwind-c6x.h
20
21module gcc.unwind.c6x;
22
23import gcc.config;
24
25version (TIC6X):
26static if (GNU_ARM_EABI_Unwinder):
27
28// Not really the ARM EABI, but pretty close.
29public import gcc.unwind.arm_common;
30
31extern (C):
32@nogc:
33
34enum int UNWIND_STACK_REG = 31;
35// Use A0 as a scratch register within the personality routine.
36enum int UNWIND_POINTER_REG = 0;
37
38_Unwind_Word _Unwind_GetIP(_Unwind_Context* context)
39{
40 return _Unwind_GetGR(context, 33);
41}
42
43void _Unwind_SetIP(_Unwind_Context* context, _Unwind_Word val)
44{
45 return _Unwind_SetGR(context, 33, val);
46}
47
48_Unwind_Word _Unwind_GetIPInfo(_Unwind_Context* context, int* ip_before_insn)
49{
50 *ip_before_insn = 0;
51 return _Unwind_GetIP(context);
52}