- Timestamp:
- Feb 9, 2018, 4:33:29 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bede27b
- Parents:
- 539cdfe
- Location:
- src/libcfa
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/Makefile.am
r539cdfe r381fdee 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 ## Last Modified By : Andrew Beach13 ## Last Modified On : Wed Jul 26 14:15:00 201714 ## Update Count : 22 112 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri Feb 9 15:51:24 2018 14 ## Update Count : 223 15 15 ############################################################################### 16 16 … … 92 92 libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug 93 93 94 stdhdr = ${shell echo stdhdr/*}94 stdhdr = ${shell find stdhdr -type f -printf "%p "} 95 95 96 96 cfa_includedir = $(CFA_INCDIR) -
src/libcfa/concurrency/invoke.c
r539cdfe r381fdee 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 23 14:04:56 201813 // Update Count : 212 // Last Modified On : Fri Feb 9 14:41:56 2018 13 // Update Count : 3 14 14 // 15 15 … … 93 93 struct coStack_t* stack = &get_coroutine( this )->stack; 94 94 95 #if defined( __i386 __)95 #if defined( __i386 ) 96 96 97 97 struct FakeStack { … … 114 114 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F; //Vol. 1 8-7 115 115 116 #elif defined( __x86_64 __)116 #elif defined( __x86_64 ) 117 117 118 118 struct FakeStack { … … 150 150 fs->arg[0] = this; 151 151 fs->arg[1] = invoke; 152 152 153 #else 153 #error Only __i386__ and __x86_64__ is supported for threads in cfa154 #error uknown hardware architecture 154 155 #endif 155 156 } -
src/libcfa/concurrency/invoke.h
r539cdfe r381fdee 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 23 14:55:46201813 // Update Count : 312 // Last Modified On : Fri Feb 9 14:41:55 2018 13 // Update Count : 6 14 14 // 15 15 … … 202 202 void CtxSwitch( void * from, void * to ) asm ("CtxSwitch"); 203 203 204 #if defined( __x86_64__ ) 204 #if defined( __i386 ) 205 #define CtxGet( ctx ) __asm__ ( \ 206 "movl %%esp,%0\n" \ 207 "movl %%ebp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 209 #elif defined( __x86_64 ) 205 210 #define CtxGet( ctx ) __asm__ ( \ 206 211 "movq %%rsp,%0\n" \ 207 212 "movq %%rbp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) )209 #elif defined( __i386__ )210 #define CtxGet( ctx ) __asm__ ( \211 "movl %%esp,%0\n" \212 "movl %%ebp,%1\n" \213 213 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 214 214 #elif defined( __ARM_ARCH ) … … 217 217 "mov %1,%%r11\n" \ 218 218 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 219 #else 220 #error unknown hardware architecture 219 221 #endif 220 222 -
src/libcfa/concurrency/kernel.c
r539cdfe r381fdee 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Feb 6 21:51:26201813 // Update Count : 412 // Last Modified On : Thu Feb 8 23:52:19 2018 13 // Update Count : 5 14 14 // 15 15 16 16 //C Includes 17 17 #include <stddef.h> 18 #define ftype `ftype`19 18 extern "C" { 20 19 #include <stdio.h> … … 24 23 #include <unistd.h> 25 24 } 26 #undef ftype27 25 28 26 //CFA Includes -
src/libcfa/concurrency/preemption.c
r539cdfe r381fdee 10 10 // Created On : Mon Jun 5 14:20:42 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Feb 6 15:00:36201813 // Update Count : 1012 // Last Modified On : Fri Feb 9 14:42:34 2018 13 // Update Count : 25 14 14 // 15 15 16 16 #include "preemption.h" 17 17 18 #define ftype `ftype`19 18 extern "C" { 20 19 #include <errno.h> … … 23 22 #include <unistd.h> 24 23 } 25 #undef ftype26 24 27 25 #include "bits/signal.h" … … 50 48 51 49 // Machine specific register name 52 #if defined(__x86_64__) 50 #if defined( __i386 ) 51 #define CFA_REG_IP gregs[REG_EIP] 52 #elif defined( __x86_64 ) 53 53 #define CFA_REG_IP gregs[REG_RIP] 54 #elif defined(__i386__) 55 #define CFA_REG_IP gregs[REG_EIP] 56 #elif defined(__ARM_ARCH__) 54 #elif defined( __ARM_ARCH ) 57 55 #define CFA_REG_IP arm_pc 56 #else 57 #error unknown hardware architecture 58 58 #endif 59 59 -
src/libcfa/exception.c
r539cdfe r381fdee 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Jun 26 15:13:00 2017 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Aug 17 15:45:00 201713 // Update Count : 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 9 14:41:55 2018 13 // Update Count : 8 14 14 // 15 15 … … 453 453 // match, which is no way generic. Some more works need to be done if we want to have a single call to the try routine. 454 454 455 #if defined( __ x86_64__ ) || defined( __i386__)455 #if defined( __i386 ) || defined( __x86_64 ) 456 456 asm ( 457 457 //HEADER … … 476 476 // " .section .note.GNU-stack,\"x\",@progbits\n" 477 477 ); 478 #endif // __ x86_64__ || __i386__478 #endif // __i386 || __x86_64
Note: See TracChangeset
for help on using the changeset viewer.