Changes in / [f7d6bb0:6e0f4bd]


Ignore:
Location:
src
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    rf7d6bb0 r6e0f4bd  
    6262                virtual ~MemberIterator() {}
    6363
     64                /// walks the current object using the given designators as a guide
    6465                virtual void setPosition( std::list< Expression * > & designators ) = 0;
     66
     67                /// retrieve the list of possible Type/Designaton pairs for the current position in the currect object
    6568                virtual std::list<InitAlternative> operator*() const = 0;
     69
     70                /// true if the iterator is not currently at the end
    6671                virtual operator bool() const = 0;
     72
     73                /// moves the iterator by one member in the current object
    6774                virtual MemberIterator & bigStep() = 0;
     75
     76                /// moves the iterator by one member in the current subobject
    6877                virtual MemberIterator & smallStep() = 0;
     78
     79                /// the type of the current object
    6980                virtual Type * getType() = 0;
     81
     82                /// the type of the current subobject
    7083                virtual Type * getNext() = 0;
    7184
     85                /// printing for debug
    7286                virtual void print( std::ostream & out, Indenter indent ) const = 0;
    7387
     88                /// helper for operator*; aggregates must add designator to each init alternative, but
     89                /// adding designators in operator* creates duplicates.
    7490                virtual std::list<InitAlternative> first() const = 0; // should be protected
    7591        };
     
    354370                                }
    355371                        }
    356                         // if ( curMember == std::next( decl->get_members().begin(), 1 ) ) { // xxx - this never triggers because curMember is incremented immediately on construction
    357                         if ( atbegin ) { // xxx - this never triggers because curMember is incremented immediately on construction
     372                        if ( atbegin ) {
    358373                                // xxx - what about case of empty struct??
    359374                                // only add self if at the very beginning of the structure
     
    389404                        return *this;
    390405                }
    391                 virtual std::list<InitAlternative> first() const { return std::list<InitAlternative>{}; }
    392406        };
    393407
  • src/libcfa/bits/locks.h

    rf7d6bb0 r6e0f4bd  
    99// Author           : Thierry Delisle
    1010// Created On       : Tue Oct 31 15:14:38 2017
    11 // Last Modified By : --
    12 // Last Modified On : --
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Dec  8 16:02:22 2017
     13// Update Count     : 1
    1414//
    1515
     
    2424#elif defined( __i386 ) || defined( __x86_64 )
    2525        #define Pause() __asm__ __volatile__ ( "pause" : : : )
     26#elif defined( __ARM_ARCH )
     27        #define Pause() __asm__ __volatile__ ( "nop" : : : )
    2628#else
    2729        #error unsupported architecture
    2830#endif
    2931
    30 #if defined( __i386 ) || defined( __x86_64 )
     32#if defined( __i386 ) || defined( __x86_64 ) || defined( __ARM_ARCH )
    3133        // Intel recommendation
    3234        #define __ALIGN__ __attribute__(( aligned (128) ))
     
    3739#endif
    3840
    39 #if defined( __x86_64 )
     41#if __SIZEOF_SIZE_T__ == 8
    4042        #define __lock_test_and_test_and_set( lock ) (lock) == 0 && __sync_lock_test_and_set_8( &(lock), 1 ) == 0
    4143        #define __lock_release( lock ) __sync_lock_release_8( &(lock) );
    42 #elif defined( __i386 )
     44#elif __SIZEOF_SIZE_T__ == 4
    4345        #define __lock_test_and_test_and_set( lock ) (lock) == 0 && __sync_lock_test_and_set_4( &(lock), 1 ) == 0
    4446        #define __lock_release( lock ) __sync_lock_release_4( &(lock) );
     
    4850
    4951struct __spinlock_t {
    50         __ALIGN__ volatile uintptr_t lock;
     52        __ALIGN__ volatile size_t lock;
    5153        #ifdef __CFA_DEBUG__
    5254                const char * prev_name;
  • src/libcfa/concurrency/invoke.c

    rf7d6bb0 r6e0f4bd  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:28:33 2017
    13 // Update Count     : 1
     12// Last Modified On : Tue Jan 23 14:04:56 2018
     13// Update Count     : 2
    1414//
    1515
     
    133133        ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
    134134        ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
     135
     136#elif defined( __ARM_ARCH )
     137
     138        struct FakeStack {
     139                float fpRegs[16];                       // floating point registers
     140                void *intRegs[9];                       // integer/pointer registers
     141                void *arg[2];                           // placeholder for this pointer
     142        };
     143
     144        ((struct machine_context_t *)stack->context)->SP = (char *)stack->base - sizeof( struct FakeStack );
     145        ((struct machine_context_t *)stack->context)->FP = NULL;
     146
     147        struct FakeStack *fs = (struct FakeStack *)((struct machine_context_t *)stack->context)->SP;
     148
     149        fs->intRegs[8] = CtxInvokeStub;
     150        fs->arg[0] = this;
     151        fs->arg[1] = invoke;
    135152#else
    136153        #error Only __i386__ and __x86_64__ is supported for threads in cfa
  • src/libcfa/concurrency/invoke.h

    rf7d6bb0 r6e0f4bd  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:28:56 2017
    13 // Update Count     : 1
     12// Last Modified On : Tue Jan 23 14:55:46 2018
     13// Update Count     : 3
    1414//
    1515
     
    209209                        "movl %%ebp,%1\n"   \
    210210                : "=rm" (ctx.SP), "=rm" (ctx.FP) )
     211        #elif defined( __ARM_ARCH )
     212        #define CtxGet( ctx ) __asm__ ( \
     213                        "mov %0,%%sp\n"   \
     214                        "mov %1,%%r11\n"   \
     215                : "=rm" (ctx.SP), "=rm" (ctx.FP) )
    211216        #endif
    212217
  • src/libcfa/concurrency/kernel.c

    rf7d6bb0 r6e0f4bd  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:33:18 2017
    13 // Update Count     : 2
     12// Last Modified On : Fri Dec  8 16:23:33 2017
     13// Update Count     : 3
    1414//
    1515
    1616//C Includes
    1717#include <stddef.h>
     18#define ftype `ftype`
    1819extern "C" {
    1920#include <stdio.h>
     
    2324#include <unistd.h>
    2425}
     26#undef ftype
    2527
    2628//CFA Includes
  • src/libcfa/concurrency/preemption.c

    rf7d6bb0 r6e0f4bd  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:36:05 2017
    13 // Update Count     : 2
     12// Last Modified On : Tue Jan 23 17:59:30 2018
     13// Update Count     : 7
    1414//
    1515
    1616#include "preemption.h"
    1717
     18#define ftype `ftype`
    1819extern "C" {
    1920#include <errno.h>
     
    2627#include <unistd.h>
    2728}
    28 
     29#undef ftype
    2930
    3031#ifdef __USE_STREAM__
     
    6061
    6162// Machine specific register name
    62 #ifdef __x86_64__
     63#if   defined(__x86_64__)
    6364#define CFA_REG_IP REG_RIP
    64 #else
     65#elif defined(__i386__)
    6566#define CFA_REG_IP REG_EIP
     67#elif defined(__ARM_ARCH__)
     68#define CFA_REG_IP REG_R15
    6669#endif
    6770
     
    296299// Receives SIGUSR1 signal and causes the current thread to yield
    297300void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ) {
     301#if defined( __ARM_ARCH )
     302        __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.arm_pc); )
     303#else
    298304        __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); )
    299 
    300         // Check if it is safe to preempt here
     305#endif
     306
     307                // Check if it is safe to preempt here
    301308        if( !preemption_ready() ) { return; }
    302309
  • src/tests/.expect/vector.txt

    rf7d6bb0 r6e0f4bd  
    1 /usr/bin/ld: cannot open output file vector: Is a directory
    2 collect2: error: ld returned 1 exit status
     10
     21
     32
     43
     50
Note: See TracChangeset for help on using the changeset viewer.