Ignore:
Timestamp:
Aug 31, 2020, 7:10:57 AM (15 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
ed9949b
Parents:
e9b49379
Message:

start ARM stubs for exception handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/exception.c

    re9b49379 r915aa11  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 21 11:27:56 2020
    13 // Update Count     : 29
     12// Last Modified On : Sat Aug 29 15:52:22 2020
     13// Update Count     : 34
    1414//
    1515
     
    1818
    1919#include "exception.h"
    20 
    21 // Implementation of the secret header is hardware dependent.
    22 #if defined( __x86_64 ) || defined( __i386 )
    23 #elif defined( __ARM_ARCH )
    24 #warning FIX ME: check if anything needed for ARM
    25 #else
    26 #warning Exception Handling: No known architecture detected.
    27 #endif
    2820
    2921#include <stdlib.h>
     
    3426#include "stdhdr/assert.h"
    3527
    36 // FIX ME: temporary hack to keep ARM build working
     28#if defined( __ARM_ARCH )
     29#warning FIX ME: temporary hack to keep ARM build working
    3730#ifndef _URC_FATAL_PHASE1_ERROR
    3831#define _URC_FATAL_PHASE1_ERROR 3
     
    4134#define _URC_FATAL_PHASE2_ERROR 2
    4235#endif // ! _URC_FATAL_PHASE2_ERROR
     36#endif // __ARM_ARCH
    4337
    4438#include "lsda.h"
     
    626620
    627621#pragma GCC pop_options
     622
     623#elif defined( __ARM_ARCH )
     624_Unwind_Reason_Code __gcfa_personality_v0(
     625                int version,
     626                _Unwind_Action actions,
     627                unsigned long long exception_class,
     628                struct _Unwind_Exception * unwind_exception,
     629                struct _Unwind_Context * unwind_context) {
     630        return _URC_CONTINUE_UNWIND;
     631}
     632
     633__attribute__((noinline))
     634void __cfaehm_try_terminate(void (*try_block)(),
     635                void (*catch_block)(int index, exception_t * except),
     636                __attribute__((unused)) int (*match_block)(exception_t * except)) {
     637}
     638#else
     639        #error unsupported hardware architecture
    628640#endif // __x86_64 || __i386
Note: See TracChangeset for help on using the changeset viewer.