Changes in / [a9b657a:c857ad3]
- Files:
-
- 12 edited
-
Jenkinsfile (modified) (1 diff)
-
configure (modified) (4 diffs)
-
configure.ac (modified) (1 diff)
-
src/Parser/DeclarationNode.cc (modified) (2 diffs)
-
src/Parser/TypeData.h (modified) (2 diffs)
-
src/Parser/lex.ll (modified) (4 diffs)
-
src/Parser/parser.yy (modified) (5 diffs)
-
src/libcfa/concurrency/CtxSwitch-i386.S (modified) (3 diffs)
-
src/libcfa/concurrency/CtxSwitch-x86_64.S (modified) (2 diffs)
-
src/libcfa/concurrency/invoke.c (modified) (2 diffs)
-
src/libcfa/fstream (modified) (3 diffs)
-
src/libcfa/fstream.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
ra9b657a rc857ad3 227 227 switch( arch ) { 228 228 case 'x64': 229 return '--host=x86_64 '229 return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"' 230 230 break 231 231 case 'x86': 232 return '--host=i386 '232 return '--host=i386 CXXFLAGS="-m32" CFAFLAGS="-m32"' 233 233 break 234 234 default : -
configure
ra9b657a rc857ad3 644 644 CXXFLAGS 645 645 CXX 646 CFA_FLAGS647 646 MACHINE_TYPE 648 647 host_os … … 654 653 build_cpu 655 654 build 655 CFA_FLAGS 656 656 CFA_LIBDIR 657 657 CFA_BINDIR … … 3302 3302 3303 3303 3304 3305 cat >>confdefs.h <<_ACEOF 3306 #define CFA_FLAGS "${CFAFLAGS}" 3307 _ACEOF 3308 3309 CFA_FLAGS=${CFAFLAGS} 3310 3311 3304 3312 # Make sure we can run config.sub. 3305 3313 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || … … 3374 3382 3375 3383 MACHINE_TYPE=$host_cpu 3376 3377 3378 if ! test "$host_cpu" = "$build_cpu"; then3379 case $host_cpu in3380 i386)3381 CFLAGS+="-m32"3382 CXXFLAGS+="-m32"3383 CFAFLAGS+="-m32"3384 LDFLAGS+="-m32"3385 ;;3386 i686)3387 CFLAGS+="-m32"3388 CXXFLAGS+="-m32"3389 CFAFLAGS+="-m32"3390 LDFLAGS+="-m32"3391 ;;3392 x86_64)3393 CFLAGS+="-m64"3394 CXXFLAGS+="-m64"3395 CFAFLAGS+="-m64"3396 LDFLAGS+="-m64"3397 ;;3398 esac3399 fi3400 3401 3402 cat >>confdefs.h <<_ACEOF3403 #define CFA_FLAGS "${CFAFLAGS}"3404 _ACEOF3405 3406 CFA_FLAGS=${CFAFLAGS}3407 3384 3408 3385 -
configure.ac
ra9b657a rc857ad3 169 169 AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) 170 170 171 AC_CANONICAL_BUILD 171 AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.]) 172 AC_SUBST(CFA_FLAGS, ${CFAFLAGS}) 173 172 174 AC_CANONICAL_HOST 173 175 AC_SUBST([MACHINE_TYPE],[$host_cpu]) 174 175 if ! test "$host_cpu" = "$build_cpu"; then176 case $host_cpu in177 i386)178 CFLAGS+="-m32"179 CXXFLAGS+="-m32"180 CFAFLAGS+="-m32"181 LDFLAGS+="-m32"182 ;;183 i686)184 CFLAGS+="-m32"185 CXXFLAGS+="-m32"186 CFAFLAGS+="-m32"187 LDFLAGS+="-m32"188 ;;189 x86_64)190 CFLAGS+="-m64"191 CXXFLAGS+="-m64"192 CFAFLAGS+="-m64"193 LDFLAGS+="-m64"194 ;;195 esac196 fi197 198 AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.])199 AC_SUBST(CFA_FLAGS, ${CFAFLAGS})200 176 201 177 # Checks for programs. -
src/Parser/DeclarationNode.cc
ra9b657a rc857ad3 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 7 17:28:56201713 // Update Count : 93 712 // Last Modified On : Tue Mar 7 08:02:09 2017 13 // Update Count : 936 14 14 // 15 15 … … 359 359 DeclarationNode * newnode = new DeclarationNode; 360 360 newnode->type = new TypeData( TypeData::Pointer ); 361 if ( qualifiers ) { 362 return newnode->addQualifiers( qualifiers ); 363 } else { 364 return newnode; 365 } // if 361 return newnode->addQualifiers( qualifiers ); 366 362 } // DeclarationNode::newPointer 367 363 -
src/Parser/TypeData.h
ra9b657a rc857ad3 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 8 22:28:33 201713 // Update Count : 17 412 // Last Modified On : Tue Mar 7 08:03:53 2017 13 // Update Count : 173 14 14 // 15 15 … … 76 76 DeclarationNode::Length length = DeclarationNode::NoLength; 77 77 DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType; 78 79 78 typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers; 80 79 TypeQualifiers typeQualifiers; 81 80 DeclarationNode * forall; 82 81 83 // Basic_t basic; 84 Aggregate_t aggregate; 85 AggInst_t aggInst; 86 Array_t array; 87 Enumeration_t enumeration; 88 // Variable_t variable; 89 Function_t function; 90 Symbolic_t symbolic; 91 DeclarationNode * tuple; 92 ExpressionNode * typeexpr; 82 // Basic_t basic; 83 Aggregate_t aggregate; 84 AggInst_t aggInst; 85 Array_t array; 86 Enumeration_t enumeration; 87 // Variable_t variable; 88 Function_t function; 89 Symbolic_t symbolic; 90 DeclarationNode * tuple; 91 ExpressionNode * typeexpr; 92 // DeclarationNode::BuiltinType builtin; 93 93 94 94 TypeData( Kind k = Unknown ); -
src/Parser/lex.ll
ra9b657a rc857ad3 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu Mar 9 21:38:26201713 * Update Count : 50 512 * Last Modified On : Fri Mar 3 22:18:00 2017 13 * Update Count : 502 14 14 */ 15 15 … … 202 202 __const__ { KEYWORD_RETURN(CONST); } // GCC 203 203 continue { KEYWORD_RETURN(CONTINUE); } 204 _Coroutine { KEYWORD_RETURN(COROUTINE); } // CFA205 204 default { KEYWORD_RETURN(DEFAULT); } 206 205 disable { KEYWORD_RETURN(DISABLE); } // CFA … … 236 235 long { KEYWORD_RETURN(LONG); } 237 236 lvalue { KEYWORD_RETURN(LVALUE); } // CFA 238 _Monitor { KEYWORD_RETURN(MONITOR); } // CFA239 237 mutex { KEYWORD_RETURN(MUTEX); } // CFA 240 238 _Noreturn { KEYWORD_RETURN(NORETURN); } // C11 … … 256 254 struct { KEYWORD_RETURN(STRUCT); } 257 255 switch { KEYWORD_RETURN(SWITCH); } 258 _Thread { KEYWORD_RETURN(THREAD); } // C11259 256 _Thread_local { KEYWORD_RETURN(THREADLOCAL); } // C11 260 257 throw { KEYWORD_RETURN(THROW); } // CFA -
src/Parser/parser.yy
ra9b657a rc857ad3 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 9 21:40:20201713 // Update Count : 22 9212 // Last Modified On : Sun Mar 5 15:48:24 2017 13 // Update Count : 2227 14 14 // 15 15 … … 104 104 %token TYPEOF LABEL // GCC 105 105 %token ENUM STRUCT UNION 106 %token COROUTINE MONITOR THREAD // CFA107 106 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA 108 107 %token SIZEOF OFFSETOF … … 224 223 %type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr 225 224 226 %type<decl> identifier_parameter_ declarator identifier_parameter_ptr identifier_parameter_arrayidentifier_parameter_function227 %type<decl> identifier_ list225 %type<decl> identifier_parameter_array identifier_parameter_declarator identifier_parameter_function 226 %type<decl> identifier_parameter_ptr identifier_list 228 227 229 228 %type<decl> cfa_abstract_array cfa_abstract_declarator_no_tuple cfa_abstract_declarator_tuple … … 271 270 %type<en> type_name_list 272 271 273 %type<decl> type_qualifier type_qualifier_name type_qualifier_list_opt type_qualifier_list 274 %type<decl> type_specifier type_specifier_nobody 272 %type<decl> type_qualifier type_qualifier_name type_qualifier_list type_qualifier_list_opt type_specifier type_specifier_nobody 275 273 276 274 %type<decl> variable_declarator variable_ptr variable_array variable_function … … 1635 1633 | UNION 1636 1634 { $$ = DeclarationNode::Union; } 1637 | COROUTINE1638 { $$ = DeclarationNode::Struct; }1639 | MONITOR1640 { $$ = DeclarationNode::Struct; }1641 | THREAD1642 { $$ = DeclarationNode::Struct; }1643 1635 ; 1644 1636 -
src/libcfa/concurrency/CtxSwitch-i386.S
ra9b657a rc857ad3 52 52 movl 4(%esp),%eax 53 53 54 // Save floating & SSE control words on the stack.55 56 sub $8,%esp57 stmxcsr 0(%esp) // 4 bytes58 fnstcw 4(%esp) // 2 bytes59 60 54 // Save volatile registers on the stack. 61 55 … … 75 69 // argument is now at 8 + 12 = 20(%esp) 76 70 77 movl 2 8(%esp),%eax71 movl 20(%esp),%eax 78 72 79 73 // Load new context from the "to" area. … … 87 81 popl %edi 88 82 popl %ebx 89 90 // Load floating & SSE control words from the stack.91 92 fldcw 4(%esp)93 ldmxcsr 0(%esp)94 add $8,%esp95 83 96 84 // Return to thread. -
src/libcfa/concurrency/CtxSwitch-x86_64.S
ra9b657a rc857ad3 47 47 CtxSwitch: 48 48 49 // Save floating & SSE control words on the stack.49 // Save volatile registers on the stack. 50 50 51 51 subq $8,%rsp 52 52 stmxcsr 0(%rsp) // 4 bytes 53 53 fnstcw 4(%rsp) // 2 bytes 54 55 // Save volatile registers on the stack.56 57 54 pushq %r15 58 55 pushq %r14 … … 78 75 popq %r14 79 76 popq %r15 80 81 // Load floating & SSE control words from the stack.82 83 77 fldcw 4(%rsp) 84 78 ldmxcsr 0(%rsp) 85 addq $8,%rsp79 addq $8,%rsp 86 80 87 81 // Return to thread. -
src/libcfa/concurrency/invoke.c
ra9b657a rc857ad3 91 91 struct FakeStack { 92 92 void *fixedRegisters[3]; // fixed registers ebx, edi, esi (popped on 1st uSwitch, values unimportant) 93 uint32_t mxcr; // SSE Status and Control bits (control bits are preserved across function calls) 94 uint16_t fcw; // X97 FPU control word (preserved across function calls) 95 void *rturn; // where to go on return from uSwitch 93 void *rturn; // where to go on return from uSwitch 96 94 void *dummyReturn; // fake return compiler would have pushed on call to uInvoke 97 95 void *argument[3]; // for 16-byte ABI, 16-byte alignment starts here … … 110 108 struct FakeStack { 111 109 void *fixedRegisters[5]; // fixed registers rbx, r12, r13, r14, r15 112 uint32_t mxcr; // SSE Status and Control bits (control bits are preserved across function calls)113 uint16_t fcw; // X97 FPU control word (preserved across function calls)114 void *rturn; // where to go on return from uSwitch110 uint32_t mxcr; // SSE Status and Control bits (control bits are preserved across function calls) 111 uint16_t fcw; // X97 FPU control word (preserved across function calls) 112 void *rturn; // where to go on return from uSwitch 115 113 void *dummyReturn; // NULL return address to provide proper alignment 116 114 }; -
src/libcfa/fstream
ra9b657a rc857ad3 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Mar 7 14:48:08 201713 // Update Count : 9112 // Last Modified On : Thu Apr 28 08:08:04 2016 13 // Update Count : 88 14 14 // 15 15 … … 23 23 void *file; 24 24 _Bool sepDefault; 25 _Bool sepOnOff;25 int sepOnOff; // FIX ME: type should be _Bool 26 26 char separator[separateSize]; 27 27 }; // ofstream … … 32 32 void sepReset( ofstream * ); 33 33 void sepReset( ofstream *, _Bool ); 34 void sepSet( ofstream *, const char * ); 34 35 const char * sepGet( ofstream * ); 35 void sepSet( ofstream *, const char * );36 36 _Bool sepDisable( ofstream * ); 37 37 _Bool sepEnable( ofstream * ); 38 39 38 int fail( ofstream * ); 40 39 int flush( ofstream * ); -
src/libcfa/fstream.c
ra9b657a rc857ad3 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 7 14:48:09 201713 // Update Count : 1 9212 // Last Modified On : Fri Jul 15 13:35:29 2016 13 // Update Count : 188 14 14 // 15 15 … … 21 21 #include <stdarg.h> // varargs 22 22 #include <string.h> // strlen 23 #include <stdbool.h> // true/false24 23 #include <float.h> // DBL_DIG, LDBL_DIG 25 24 #include <complex.h> // creal, cimag … … 33 32 void sepReset( ofstream * os ) { os->sepOnOff = os->sepDefault; } 34 33 void sepReset( ofstream * os, _Bool reset ) { os->sepDefault = reset; os->sepOnOff = os->sepDefault; } 35 const char * sepGet( ofstream * os ) { return &(os->separator[0]); }36 37 34 void sepSet( ofstream * os, const char * s ) { 38 35 strncpy( &(os->separator[0]), s, separateSize - 1 ); 39 36 os->separator[separateSize - 1] = '\0'; 40 37 } // sepSet 41 38 const char * sepGet( ofstream * os ) { return &(os->separator[0]); } 42 39 _Bool sepDisable( ofstream *os ) { 43 40 _Bool temp = os->sepDefault; 44 os->sepDefault = false;41 os->sepDefault = 0; 45 42 sepReset( os ); 46 43 return temp; 47 44 } // sepDisable 48 49 45 _Bool sepEnable( ofstream *os ) { 50 46 _Bool temp = os->sepDefault; 51 os->sepDefault = true;47 os->sepDefault = 1; 52 48 sepReset( os ); 53 49 return temp;
Note:
See TracChangeset
for help on using the changeset viewer.