Changeset a9b657a
- Timestamp:
- Mar 10, 2017, 11:01:31 AM (8 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:
- dc0557d
- Parents:
- c857ad3 (diff), 149d297 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
rc857ad3 ra9b657a 227 227 switch( arch ) { 228 228 case 'x64': 229 return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'229 return '--host=x86_64' 230 230 break 231 231 case 'x86': 232 return '--host=i386 CXXFLAGS="-m32" CFAFLAGS="-m32"'232 return '--host=i386' 233 233 break 234 234 default : -
configure
rc857ad3 ra9b657a 644 644 CXXFLAGS 645 645 CXX 646 CFA_FLAGS 646 647 MACHINE_TYPE 647 648 host_os … … 653 654 build_cpu 654 655 build 655 CFA_FLAGS656 656 CFA_LIBDIR 657 657 CFA_BINDIR … … 3302 3302 3303 3303 3304 3305 cat >>confdefs.h <<_ACEOF3306 #define CFA_FLAGS "${CFAFLAGS}"3307 _ACEOF3308 3309 CFA_FLAGS=${CFAFLAGS}3310 3311 3312 3304 # Make sure we can run config.sub. 3313 3305 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || … … 3382 3374 3383 3375 MACHINE_TYPE=$host_cpu 3376 3377 3378 if ! test "$host_cpu" = "$build_cpu"; then 3379 case $host_cpu in 3380 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 esac 3399 fi 3400 3401 3402 cat >>confdefs.h <<_ACEOF 3403 #define CFA_FLAGS "${CFAFLAGS}" 3404 _ACEOF 3405 3406 CFA_FLAGS=${CFAFLAGS} 3384 3407 3385 3408 -
configure.ac
rc857ad3 ra9b657a 169 169 AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) 170 170 171 AC_CANONICAL_BUILD 172 AC_CANONICAL_HOST 173 AC_SUBST([MACHINE_TYPE],[$host_cpu]) 174 175 if ! test "$host_cpu" = "$build_cpu"; then 176 case $host_cpu in 177 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 esac 196 fi 197 171 198 AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.]) 172 199 AC_SUBST(CFA_FLAGS, ${CFAFLAGS}) 173 174 AC_CANONICAL_HOST175 AC_SUBST([MACHINE_TYPE],[$host_cpu])176 200 177 201 # Checks for programs. -
src/Parser/DeclarationNode.cc
rc857ad3 ra9b657a 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 08:02:09201713 // Update Count : 93 612 // Last Modified On : Tue Mar 7 17:28:56 2017 13 // Update Count : 937 14 14 // 15 15 … … 359 359 DeclarationNode * newnode = new DeclarationNode; 360 360 newnode->type = new TypeData( TypeData::Pointer ); 361 return newnode->addQualifiers( qualifiers ); 361 if ( qualifiers ) { 362 return newnode->addQualifiers( qualifiers ); 363 } else { 364 return newnode; 365 } // if 362 366 } // DeclarationNode::newPointer 363 367 -
src/Parser/TypeData.h
rc857ad3 ra9b657a 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 7 08:03:53 201713 // Update Count : 17 312 // Last Modified On : Wed Mar 8 22:28:33 2017 13 // Update Count : 174 14 14 // 15 15 … … 76 76 DeclarationNode::Length length = DeclarationNode::NoLength; 77 77 DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType; 78 78 79 typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers; 79 80 TypeQualifiers typeQualifiers; 80 81 DeclarationNode * forall; 81 82 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; 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; 93 93 94 94 TypeData( Kind k = Unknown ); -
src/Parser/lex.ll
rc857ad3 ra9b657a 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Fri Mar 3 22:18:00201713 * Update Count : 50 212 * Last Modified On : Thu Mar 9 21:38:26 2017 13 * Update Count : 505 14 14 */ 15 15 … … 202 202 __const__ { KEYWORD_RETURN(CONST); } // GCC 203 203 continue { KEYWORD_RETURN(CONTINUE); } 204 _Coroutine { KEYWORD_RETURN(COROUTINE); } // CFA 204 205 default { KEYWORD_RETURN(DEFAULT); } 205 206 disable { KEYWORD_RETURN(DISABLE); } // CFA … … 235 236 long { KEYWORD_RETURN(LONG); } 236 237 lvalue { KEYWORD_RETURN(LVALUE); } // CFA 238 _Monitor { KEYWORD_RETURN(MONITOR); } // CFA 237 239 mutex { KEYWORD_RETURN(MUTEX); } // CFA 238 240 _Noreturn { KEYWORD_RETURN(NORETURN); } // C11 … … 254 256 struct { KEYWORD_RETURN(STRUCT); } 255 257 switch { KEYWORD_RETURN(SWITCH); } 258 _Thread { KEYWORD_RETURN(THREAD); } // C11 256 259 _Thread_local { KEYWORD_RETURN(THREADLOCAL); } // C11 257 260 throw { KEYWORD_RETURN(THROW); } // CFA -
src/Parser/parser.yy
rc857ad3 ra9b657a 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Mar 5 15:48:24201713 // Update Count : 22 2712 // Last Modified On : Thu Mar 9 21:40:20 2017 13 // Update Count : 2292 14 14 // 15 15 … … 104 104 %token TYPEOF LABEL // GCC 105 105 %token ENUM STRUCT UNION 106 %token COROUTINE MONITOR THREAD // CFA 106 107 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA 107 108 %token SIZEOF OFFSETOF … … 223 224 %type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr 224 225 225 %type<decl> identifier_parameter_ array identifier_parameter_declaratoridentifier_parameter_function226 %type<decl> identifier_ parameter_ptr identifier_list226 %type<decl> identifier_parameter_declarator identifier_parameter_ptr identifier_parameter_array identifier_parameter_function 227 %type<decl> identifier_list 227 228 228 229 %type<decl> cfa_abstract_array cfa_abstract_declarator_no_tuple cfa_abstract_declarator_tuple … … 270 271 %type<en> type_name_list 271 272 272 %type<decl> type_qualifier type_qualifier_name type_qualifier_list type_qualifier_list_opt type_specifier type_specifier_nobody 273 %type<decl> type_qualifier type_qualifier_name type_qualifier_list_opt type_qualifier_list 274 %type<decl> type_specifier type_specifier_nobody 273 275 274 276 %type<decl> variable_declarator variable_ptr variable_array variable_function … … 1633 1635 | UNION 1634 1636 { $$ = DeclarationNode::Union; } 1637 | COROUTINE 1638 { $$ = DeclarationNode::Struct; } 1639 | MONITOR 1640 { $$ = DeclarationNode::Struct; } 1641 | THREAD 1642 { $$ = DeclarationNode::Struct; } 1635 1643 ; 1636 1644 -
src/libcfa/concurrency/CtxSwitch-i386.S
rc857ad3 ra9b657a 52 52 movl 4(%esp),%eax 53 53 54 // Save floating & SSE control words on the stack. 55 56 sub $8,%esp 57 stmxcsr 0(%esp) // 4 bytes 58 fnstcw 4(%esp) // 2 bytes 59 54 60 // Save volatile registers on the stack. 55 61 … … 69 75 // argument is now at 8 + 12 = 20(%esp) 70 76 71 movl 2 0(%esp),%eax77 movl 28(%esp),%eax 72 78 73 79 // Load new context from the "to" area. … … 81 87 popl %edi 82 88 popl %ebx 89 90 // Load floating & SSE control words from the stack. 91 92 fldcw 4(%esp) 93 ldmxcsr 0(%esp) 94 add $8,%esp 83 95 84 96 // Return to thread. -
src/libcfa/concurrency/CtxSwitch-x86_64.S
rc857ad3 ra9b657a 47 47 CtxSwitch: 48 48 49 // Save volatile registers on the stack.49 // Save floating & SSE control words 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 54 57 pushq %r15 55 58 pushq %r14 … … 75 78 popq %r14 76 79 popq %r15 80 81 // Load floating & SSE control words from the stack. 82 77 83 fldcw 4(%rsp) 78 84 ldmxcsr 0(%rsp) 79 addq $8,%rsp85 addq $8,%rsp 80 86 81 87 // Return to thread. -
src/libcfa/concurrency/invoke.c
rc857ad3 ra9b657a 91 91 struct FakeStack { 92 92 void *fixedRegisters[3]; // fixed registers ebx, edi, esi (popped on 1st uSwitch, values unimportant) 93 void *rturn; // where to go on return from uSwitch 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 94 96 void *dummyReturn; // fake return compiler would have pushed on call to uInvoke 95 97 void *argument[3]; // for 16-byte ABI, 16-byte alignment starts here … … 108 110 struct FakeStack { 109 111 void *fixedRegisters[5]; // fixed registers rbx, r12, r13, r14, r15 110 uint32_t mxcr; 111 uint16_t fcw; 112 void *rturn; 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 uSwitch 113 115 void *dummyReturn; // NULL return address to provide proper alignment 114 116 }; -
src/libcfa/fstream
rc857ad3 ra9b657a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Apr 28 08:08:04 201613 // Update Count : 8812 // Last Modified On : Tue Mar 7 14:48:08 2017 13 // Update Count : 91 14 14 // 15 15 … … 23 23 void *file; 24 24 _Bool sepDefault; 25 int sepOnOff; // FIX ME: type should be _Bool25 _Bool sepOnOff; 26 26 char separator[separateSize]; 27 27 }; // ofstream … … 32 32 void sepReset( ofstream * ); 33 33 void sepReset( ofstream *, _Bool ); 34 const char * sepGet( ofstream * ); 34 35 void sepSet( ofstream *, const char * ); 35 const char * sepGet( ofstream * );36 36 _Bool sepDisable( ofstream * ); 37 37 _Bool sepEnable( ofstream * ); 38 38 39 int fail( ofstream * ); 39 40 int flush( ofstream * ); -
src/libcfa/fstream.c
rc857ad3 ra9b657a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 15 13:35:29 201613 // Update Count : 1 8812 // Last Modified On : Tue Mar 7 14:48:09 2017 13 // Update Count : 192 14 14 // 15 15 … … 21 21 #include <stdarg.h> // varargs 22 22 #include <string.h> // strlen 23 #include <stdbool.h> // true/false 23 24 #include <float.h> // DBL_DIG, LDBL_DIG 24 25 #include <complex.h> // creal, cimag … … 32 33 void sepReset( ofstream * os ) { os->sepOnOff = os->sepDefault; } 33 34 void sepReset( ofstream * os, _Bool reset ) { os->sepDefault = reset; os->sepOnOff = os->sepDefault; } 35 const char * sepGet( ofstream * os ) { return &(os->separator[0]); } 36 34 37 void sepSet( ofstream * os, const char * s ) { 35 38 strncpy( &(os->separator[0]), s, separateSize - 1 ); 36 39 os->separator[separateSize - 1] = '\0'; 37 40 } // sepSet 38 const char * sepGet( ofstream * os ) { return &(os->separator[0]); } 41 39 42 _Bool sepDisable( ofstream *os ) { 40 43 _Bool temp = os->sepDefault; 41 os->sepDefault = 0;44 os->sepDefault = false; 42 45 sepReset( os ); 43 46 return temp; 44 47 } // sepDisable 48 45 49 _Bool sepEnable( ofstream *os ) { 46 50 _Bool temp = os->sepDefault; 47 os->sepDefault = 1;51 os->sepDefault = true; 48 52 sepReset( os ); 49 53 return temp;
Note: See TracChangeset
for help on using the changeset viewer.