Home | History | Annotate | Line # | Download | only in include
ehabi.h revision 1.1.10.2
      1  1.1.10.2  tls /*-
      2  1.1.10.2  tls  * Copyright (c) 2013 The NetBSD Foundation, Inc.
      3  1.1.10.2  tls  * All rights reserved.
      4  1.1.10.2  tls  *
      5  1.1.10.2  tls  * This code is derived from software contributed to The NetBSD Foundation
      6  1.1.10.2  tls  * by Matt Thomas of 3am Software Foundry.
      7  1.1.10.2  tls  *
      8  1.1.10.2  tls  * Redistribution and use in source and binary forms, with or without
      9  1.1.10.2  tls  * modification, are permitted provided that the following conditions
     10  1.1.10.2  tls  * are met:
     11  1.1.10.2  tls  * 1. Redistributions of source code must retain the above copyright
     12  1.1.10.2  tls  *    notice, this list of conditions and the following disclaimer.
     13  1.1.10.2  tls  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1.10.2  tls  *    notice, this list of conditions and the following disclaimer in the
     15  1.1.10.2  tls  *    documentation and/or other materials provided with the distribution.
     16  1.1.10.2  tls  *
     17  1.1.10.2  tls  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     18  1.1.10.2  tls  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     19  1.1.10.2  tls  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     20  1.1.10.2  tls  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     21  1.1.10.2  tls  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     22  1.1.10.2  tls  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     23  1.1.10.2  tls  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     24  1.1.10.2  tls  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     25  1.1.10.2  tls  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     26  1.1.10.2  tls  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     27  1.1.10.2  tls  * POSSIBILITY OF SUCH DAMAGE.
     28  1.1.10.2  tls  */
     29  1.1.10.2  tls /* $NetBSD: ehabi.h,v 1.1.10.2 2014/08/20 00:02:46 tls Exp $ */
     30  1.1.10.2  tls 
     31  1.1.10.2  tls #ifndef _ARM_EHABI_H_
     32  1.1.10.2  tls #define	_ARM_EHABI_H_
     33  1.1.10.2  tls 
     34  1.1.10.2  tls #if defined(_KERNEL) || defined(_STANDALONE)
     35  1.1.10.2  tls #include <sys/types.h>
     36  1.1.10.2  tls #else
     37  1.1.10.2  tls #include <inttypes.h>
     38  1.1.10.2  tls #endif
     39  1.1.10.2  tls 
     40  1.1.10.2  tls typedef enum {
     41  1.1.10.2  tls 	_URC_OK = 0,			/* operation complete */
     42  1.1.10.2  tls 	_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
     43  1.1.10.2  tls 	_URC_HANDLER_FOUND = 6,
     44  1.1.10.2  tls 	_URC_INSTALL_CONTEXT = 7,
     45  1.1.10.2  tls 	_URC_CONTINUE_UNWIND = 8,
     46  1.1.10.2  tls 	_URC_FAILURE = 9,		/* unspecified failure */
     47  1.1.10.2  tls } _Unwind_Reason_Code;
     48  1.1.10.2  tls 
     49  1.1.10.2  tls typedef enum {
     50  1.1.10.2  tls 	_UVRSC_CORE = 0,	/* integer register */
     51  1.1.10.2  tls 	_UVRSC_VFP = 1,		/* vfp */
     52  1.1.10.2  tls 	_UVRSC_WMMXD = 3,	/* Intel WMMX data register */
     53  1.1.10.2  tls 	_UVRSC_WMMXC = 4	/* Intel WMMX control register */
     54  1.1.10.2  tls } _Unwind_VRS_RegClass;
     55  1.1.10.2  tls typedef enum {
     56  1.1.10.2  tls 	_UVRSD_UINT32 = 0,
     57  1.1.10.2  tls 	_UVRSD_VFPX = 1,
     58  1.1.10.2  tls 	_UVRSD_UINT64 = 3,
     59  1.1.10.2  tls 	_UVRSD_FLOAT = 4,
     60  1.1.10.2  tls 	_UVRSD_DOUBLE = 5
     61  1.1.10.2  tls } _Unwind_VRS_DataRepresentation;
     62  1.1.10.2  tls typedef enum {
     63  1.1.10.2  tls 	_UVRSR_OK = 0,
     64  1.1.10.2  tls 	_UVRSR_NOT_IMPLEMENTED = 1,
     65  1.1.10.2  tls 	_UVRSR_FAILED = 2
     66  1.1.10.2  tls } _Unwind_VRS_Result;
     67  1.1.10.2  tls 
     68  1.1.10.2  tls typedef uint32_t _Unwind_State;
     69  1.1.10.2  tls static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME  = 0;
     70  1.1.10.2  tls static const _Unwind_State _US_UNWIND_FRAME_STARTING = 1;
     71  1.1.10.2  tls static const _Unwind_State _US_UNWIND_FRAME_RESUME   = 2;
     72  1.1.10.2  tls 
     73  1.1.10.2  tls typedef struct _Unwind_Control_Block _Unwind_Control_Block;
     74  1.1.10.2  tls typedef struct _Unwind_Context _Unwind_Context;
     75  1.1.10.2  tls typedef uint32_t _Unwind_EHT_Header;
     76  1.1.10.2  tls 
     77  1.1.10.2  tls struct _Unwind_Control_Block {
     78  1.1.10.2  tls 	char exception_class[8];
     79  1.1.10.2  tls 	void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
     80  1.1.10.2  tls 	/* Unwinder cache, private fields for the unwinder's use */
     81  1.1.10.2  tls 	struct {
     82  1.1.10.2  tls 		uint32_t reserved1;
     83  1.1.10.2  tls 		uint32_t reserved2;
     84  1.1.10.2  tls 		uint32_t reserved3;
     85  1.1.10.2  tls 		uint32_t reserved4;
     86  1.1.10.2  tls 		uint32_t reserved5;
     87  1.1.10.2  tls 		/* init reserved1 to 0, then don't touch */
     88  1.1.10.2  tls 	} unwinder_cache;
     89  1.1.10.2  tls 	/* Propagation barrier cache (valid after phase 1): */
     90  1.1.10.2  tls 	struct {
     91  1.1.10.2  tls 		uint32_t sp;
     92  1.1.10.2  tls 		  uint32_t bitpattern[5];
     93  1.1.10.2  tls 	} barrier_cache;
     94  1.1.10.2  tls 	/* Cleanup cache (preserved over cleanup): */
     95  1.1.10.2  tls 	struct {
     96  1.1.10.2  tls 		uint32_t bitpattern[4];
     97  1.1.10.2  tls 	} cleanup_cache;
     98  1.1.10.2  tls 	/* Pr cache (for pr's benefit): */
     99  1.1.10.2  tls 	struct {
    100  1.1.10.2  tls 		uint32_t fnstart;		/* function start address */
    101  1.1.10.2  tls 		_Unwind_EHT_Header *ehtp; /* ptr to EHT entry header word */
    102  1.1.10.2  tls 		uint32_t additional;		/* additional data */
    103  1.1.10.2  tls 		uint32_t reserved1;
    104  1.1.10.2  tls 	} pr_cache;
    105  1.1.10.2  tls 	uint64_t : 0; /* Force alignment of next item to 8-byte boundary */
    106  1.1.10.2  tls };
    107  1.1.10.2  tls 
    108  1.1.10.2  tls __BEGIN_DECLS
    109  1.1.10.2  tls 
    110  1.1.10.2  tls /* Unwinding functions */
    111  1.1.10.2  tls void			_Unwind_Resume(_Unwind_Control_Block *);
    112  1.1.10.2  tls void			_Unwind_Complete(_Unwind_Control_Block *);
    113  1.1.10.2  tls void			_Unwind_DeleteException(_Unwind_Control_Block *);
    114  1.1.10.2  tls _Unwind_Reason_Code	_Unwind_RaiseException(_Unwind_Control_Block *);
    115  1.1.10.2  tls 
    116  1.1.10.2  tls _Unwind_VRS_Result	_Unwind_VRS_Set(_Unwind_Context *, _Unwind_VRS_RegClass,
    117  1.1.10.2  tls 			    uint32_t, _Unwind_VRS_DataRepresentation, void *);
    118  1.1.10.2  tls _Unwind_VRS_Result	_Unwind_VRS_Get(_Unwind_Context *, _Unwind_VRS_RegClass,
    119  1.1.10.2  tls 			    uint32_t, _Unwind_VRS_DataRepresentation, void *);
    120  1.1.10.2  tls 
    121  1.1.10.2  tls _Unwind_VRS_Result	_Unwind_VRS_Pop(_Unwind_Context *, _Unwind_VRS_RegClass,
    122  1.1.10.2  tls 			    uint32_t, _Unwind_VRS_DataRepresentation);
    123  1.1.10.2  tls 
    124  1.1.10.2  tls _Unwind_Reason_Code	__aeabi_unwind_cpp_pr0(_Unwind_State,
    125  1.1.10.2  tls 			    _Unwind_Control_Block *, _Unwind_Context *);
    126  1.1.10.2  tls _Unwind_Reason_Code	__aeabi_unwind_cpp_pr1(_Unwind_State ,
    127  1.1.10.2  tls 			    _Unwind_Control_Block *, _Unwind_Context *);
    128  1.1.10.2  tls _Unwind_Reason_Code	__aeabi_unwind_cpp_pr2(_Unwind_State ,
    129  1.1.10.2  tls 			    _Unwind_Control_Block *, _Unwind_Context *);
    130  1.1.10.2  tls 
    131  1.1.10.2  tls __END_DECLS
    132  1.1.10.2  tls 
    133  1.1.10.2  tls #endif /* _ARM_EHABI_H_ */
    134