Changeset 38 for sources/src/gen_code.cc
- Timestamp:
- Jul 21, 2009, 3:28:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/gen_code.cc
r36 r38 74 74 typedef void (*CASC_ENTRY_FUNC) (void *); 75 75 typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct; 76 76 77 const char * 78 get_pmf_type () 79 { 80 switch (sizeof (SC_ENTRY_FUNC)) { 81 case 4: 82 // G4 pointer-to-member-function style 83 return "unsigned long int"; 84 case 8: 85 // PC pointer-to-member-function style 86 return "unsigned long long int"; 87 default: 88 cerr << "Internal Error : Unsupported pointer-to-member-function" 89 "(size: " << sizeof (SC_ENTRY_FUNC) << ").\n" 90 "Please try --nodynamiclink option.\n"; 91 exit(21072009); 92 }; 93 } 77 94 78 95 static … … 278 295 << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n" 279 296 << " typedef void (*CASC_ENTRY_FUNC)(void *);\n"; 280 const char *pmf_type = (sizeof (SC_ENTRY_FUNC) == 4)? 281 // G4 pointer-to-member-function style 282 "unsigned long int": 283 // PC pointer-to-member-function style 284 "unsigned long long int"; 297 298 const char *pmf_type = get_pmf_type (); 299 285 300 o << " typedef union { " 286 301 << pmf_type … … 375 390 { 376 391 if (dump_stage) 377 cerr << "Compiling C code for scheduling...\n";392 cerr << "Compiling C/C++ code for scheduling...\n"; 378 393 char compil_str[512]; 379 const char *compiler = getenv (" GCC");394 const char *compiler = getenv ("CXX"); 380 395 const char *systemc_dir = getenv ("SYSTEMCASS"); 381 396 // const char *target_arch = getenv ("TARGET_ARCH"); … … 431 446 #endif 432 447 ; 448 449 string cflags = casc_cflags; 450 if (use_openmp) 451 cflags += " -fopenmp"; 452 433 453 sprintf(compil_str, 434 454 commandline_template, 435 455 temporary_dir, 436 456 compiler, 437 c asc_cflags,457 cflags.c_str(), 438 458 systemc_dir, 439 459 target_name,
Note: See TracChangeset
for help on using the changeset viewer.