Changes in / [7a560c1:fa2de95]


Ignore:
Files:
1 added
6 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • configure

    r7a560c1 rfa2de95  
    61846184
    61856185
    6186 ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/benchmark/Makefile src/examples/Makefile src/tests/Makefile src/prelude/Makefile src/libcfa/Makefile"
     6186ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/examples/Makefile src/tests/Makefile src/prelude/Makefile src/libcfa/Makefile"
    61876187
    61886188
     
    69456945    "src/driver/Makefile") CONFIG_FILES="$CONFIG_FILES src/driver/Makefile" ;;
    69466946    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    6947     "src/benchmark/Makefile") CONFIG_FILES="$CONFIG_FILES src/benchmark/Makefile" ;;
    69486947    "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;;
    69496948    "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
  • configure.ac

    r7a560c1 rfa2de95  
    190190        src/driver/Makefile
    191191        src/Makefile
    192         src/benchmark/Makefile
    193192        src/examples/Makefile
    194193        src/tests/Makefile
  • src/ResolvExpr/Resolver.cc

    r7a560c1 rfa2de95  
    449449                        TypeSubstitution sub = makeGenericSubstitutuion( sit );
    450450                        StructDecl * st = sit->get_baseStruct();
    451                         if(st->get_members().empty()) return;
    452451                        // want to resolve each initializer to the members of the struct,
    453452                        // but if there are more initializers than members we should stop
     
    459458                        TypeSubstitution sub = makeGenericSubstitutuion( uit );
    460459                        UnionDecl * un = uit->get_baseUnion();
    461                         if(un->get_members().empty()) return;
    462460                        // only resolve to the first member of a union
    463461                        resolveSingleAggrInit( *un->get_members().begin(), init, initEnd, sub );
  • src/libcfa/concurrency/CtxSwitch-x86_64.S

    r7a560c1 rfa2de95  
    4949        // Save volatile registers on the stack.
    5050
    51         subq   $8,%rsp
    52         stmxcsr 0(%rsp)         // 4 bytes
    53         fnstcw  4(%rsp)         // 2 bytes
    5451        pushq %r15
    5552        pushq %r14
     
    7572        popq %r14
    7673        popq %r15
    77         fldcw   4(%rsp)
    78         ldmxcsr 0(%rsp)
    79         addq $8,%rsp
    8074
    8175        // Return to thread.
  • src/libcfa/concurrency/coroutines

    r7a560c1 rfa2de95  
    3030};
    3131
    32 #define DECL_COROUTINE(X) static inline coroutine* get_coroutine(X* this) { return &this->c; } void main(X* this)
     32#define DECL_COROUTINE(X) static inline coroutine* get_coroutine(X* this) { return &this->c; } void main(X* this);
    3333
    3434//-----------------------------------------------------------------------------
     
    110110}
    111111
    112 static inline void resume(coroutine * dst) {
    113         coroutine * src = this_coroutine();             // optimization
    114 
    115       // not resuming self ?
    116         if ( src != dst ) {
    117                 assertf( dst->notHalted ,
    118                         "Attempt by coroutine %.256s (%p) to resume terminated coroutine %.256s (%p).\n"
    119                         "Possible cause is terminated coroutine's main routine has already returned.",
    120                         src->name, src, dst->name, dst );
    121 
    122             // set last resumer
    123                 dst->last = src;
    124         } // if
    125 
    126       // always done for performance testing
    127         CoroutineCtxSwitch( src, dst );
    128 }
    129 
    130112#endif //COROUTINES_H
    131113
  • src/libcfa/concurrency/invoke.c

    r7a560c1 rfa2de95  
    109109      struct FakeStack {
    110110            void *fixedRegisters[5];                    // fixed registers rbx, r12, r13, r14, r15
    111             uint32_t mxcr;                                  // SSE Status and Control bits (control bits are preserved across function calls)
    112             uint16_t fcw;                                   // X97 FPU control word (preserved across function calls)
    113             void *rturn;                                      // where to go on return from uSwitch
     111            void *rturn;                                        // where to go on return from uSwitch
    114112            void *dummyReturn;                          // NULL return address to provide proper alignment
    115113      };
     
    122120      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = this;
    123121      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = invoke;
    124       ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520
    125       ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
    126122#else
    127123      #error Only __i386__ and __x86_64__ is supported for threads in cfa
  • src/libcfa/concurrency/kernel.c

    r7a560c1 rfa2de95  
    4343};
    4444
    45 DECL_COROUTINE(processorCtx_t);
     45DECL_COROUTINE(processorCtx_t)
    4646
    4747#define KERNEL_STORAGE(T,X) static char X##_storage[sizeof(T)]
  • src/libcfa/concurrency/threads

    r7a560c1 rfa2de95  
    3232};
    3333
    34 #define DECL_THREAD(X) thread* get_thread(X* this) { return &this->t; } void main(X* this)
     34#define DECL_THREAD(X) thread* get_thread(X* this) { return &this->t; } void main(X* this);
    3535
    3636forall( dtype T | is_thread(T) )
  • src/libcfa/containers/vector

    r7a560c1 rfa2de95  
    118118}
    119119
    120 // forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    121 // static inline const T* cbegin(const vector(T, allocator_t)* this)
    122 // {
    123 //      return data(&this->storage);
    124 // }
     120forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     121static inline const T* cbegin(const vector(T, allocator_t)* this)
     122{
     123        return data(&this->storage);
     124}
    125125
    126126forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     
    130130}
    131131
    132 // forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
    133 // static inline const T* cend(const vector(T, allocator_t)* this)
    134 // {
    135 //      return data(&this->storage) + this->size;
    136 // }
     132forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
     133static inline const T* cend(const vector(T, allocator_t)* this)
     134{
     135        return data(&this->storage) + this->size;
     136}
    137137
    138138//------------------------------------------------------------------------------
  • src/prelude/Makefile.am

    r7a560c1 rfa2de95  
    2929# create forward declarations for gcc builtins
    3030builtins.cf : builtins.c
    31         ${AM_V_GEN}@BACKEND_CC@ -E -P $^ | sed -f prototypes.sed > $@
     31        ${AM_V_GEN}if [ -e $< ] ; then \
     32                @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
     33        fi
    3234
    3335builtins.c : builtins.def prototypes.awk
    34         ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@
     36        ${AM_V_GEN}if [ -e $< ] ; then \
     37                @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
     38        fi
    3539
    3640builtins.def :
  • src/prelude/Makefile.in

    r7a560c1 rfa2de95  
    425425# create forward declarations for gcc builtins
    426426builtins.cf : builtins.c
    427         ${AM_V_GEN}@BACKEND_CC@ -E -P $^ | sed -f prototypes.sed > $@
     427        ${AM_V_GEN}if [ -e $< ] ; then \
     428                @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
     429        fi
    428430
    429431builtins.c : builtins.def prototypes.awk
    430         ${AM_V_GEN}@BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@
     432        ${AM_V_GEN}if [ -e $< ] ; then \
     433                @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
     434        fi
    431435
    432436builtins.def :
  • src/tests/thread.c

    r7a560c1 rfa2de95  
    77struct Second { thread t; simple_lock* lock; };
    88
    9 DECL_THREAD(First);
    10 DECL_THREAD(Second);
     9DECL_THREAD(First)
     10DECL_THREAD(Second)
    1111
    1212void ?{}( First * this, simple_lock* lock ) { this->lock = lock; }
Note: See TracChangeset for help on using the changeset viewer.