Changes in / [a9b657a:c857ad3]


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    ra9b657a rc857ad3  
    227227        switch( arch ) {
    228228                case 'x64':
    229                         return '--host=x86_64'
     229                        return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'
    230230                break
    231231                case 'x86':
    232                         return '--host=i386'
     232                        return '--host=i386   CXXFLAGS="-m32" CFAFLAGS="-m32"'
    233233                break
    234234                default :
  • configure

    ra9b657a rc857ad3  
    644644CXXFLAGS
    645645CXX
    646 CFA_FLAGS
    647646MACHINE_TYPE
    648647host_os
     
    654653build_cpu
    655654build
     655CFA_FLAGS
    656656CFA_LIBDIR
    657657CFA_BINDIR
     
    33023302
    33033303
     3304
     3305cat >>confdefs.h <<_ACEOF
     3306#define CFA_FLAGS "${CFAFLAGS}"
     3307_ACEOF
     3308
     3309CFA_FLAGS=${CFAFLAGS}
     3310
     3311
    33043312# Make sure we can run config.sub.
    33053313$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
     
    33743382
    33753383MACHINE_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}
    34073384
    34083385
  • configure.ac

    ra9b657a rc857ad3  
    169169AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
    170170
    171 AC_CANONICAL_BUILD
     171AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.])
     172AC_SUBST(CFA_FLAGS, ${CFAFLAGS})
     173
    172174AC_CANONICAL_HOST
    173175AC_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 
    198 AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.])
    199 AC_SUBST(CFA_FLAGS, ${CFAFLAGS})
    200176
    201177# Checks for programs.
  • src/Parser/DeclarationNode.cc

    ra9b657a rc857ad3  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 17:28:56 2017
    13 // Update Count     : 937
     12// Last Modified On : Tue Mar  7 08:02:09 2017
     13// Update Count     : 936
    1414//
    1515
     
    359359        DeclarationNode * newnode = new DeclarationNode;
    360360        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 );
    366362} // DeclarationNode::newPointer
    367363
  • src/Parser/TypeData.h

    ra9b657a rc857ad3  
    1010// Created On       : Sat May 16 15:18:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  8 22:28:33 2017
    13 // Update Count     : 174
     12// Last Modified On : Tue Mar  7 08:03:53 2017
     13// Update Count     : 173
    1414//
    1515
     
    7676        DeclarationNode::Length length = DeclarationNode::NoLength;
    7777        DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType;
    78 
    7978        typedef std::bitset< DeclarationNode::NoTypeQualifier > TypeQualifiers;
    8079        TypeQualifiers typeQualifiers;
    8180        DeclarationNode * forall;
    8281
    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;
    9393
    9494        TypeData( Kind k = Unknown );
  • src/Parser/lex.ll

    ra9b657a rc857ad3  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu Mar  9 21:38:26 2017
    13  * Update Count     : 505
     12 * Last Modified On : Fri Mar  3 22:18:00 2017
     13 * Update Count     : 502
    1414 */
    1515
     
    202202__const__               { KEYWORD_RETURN(CONST); }                              // GCC
    203203continue                { KEYWORD_RETURN(CONTINUE); }
    204 _Coroutine              { KEYWORD_RETURN(COROUTINE); }                  // CFA
    205204default                 { KEYWORD_RETURN(DEFAULT); }
    206205disable                 { KEYWORD_RETURN(DISABLE); }                    // CFA
     
    236235long                    { KEYWORD_RETURN(LONG); }
    237236lvalue                  { KEYWORD_RETURN(LVALUE); }                             // CFA
    238 _Monitor                { KEYWORD_RETURN(MONITOR); }                    // CFA
    239237mutex                   { KEYWORD_RETURN(MUTEX); }                              // CFA
    240238_Noreturn               { KEYWORD_RETURN(NORETURN); }                   // C11
     
    256254struct                  { KEYWORD_RETURN(STRUCT); }
    257255switch                  { KEYWORD_RETURN(SWITCH); }
    258 _Thread                 { KEYWORD_RETURN(THREAD); }                             // C11
    259256_Thread_local   { KEYWORD_RETURN(THREADLOCAL); }                // C11
    260257throw                   { KEYWORD_RETURN(THROW); }                              // CFA
  • src/Parser/parser.yy

    ra9b657a rc857ad3  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar  9 21:40:20 2017
    13 // Update Count     : 2292
     12// Last Modified On : Sun Mar  5 15:48:24 2017
     13// Update Count     : 2227
    1414//
    1515
     
    104104%token TYPEOF LABEL                                                                             // GCC
    105105%token ENUM STRUCT UNION
    106 %token COROUTINE MONITOR THREAD                                                 // CFA
    107106%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    108107%token SIZEOF OFFSETOF
     
    224223%type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr
    225224
    226 %type<decl> identifier_parameter_declarator identifier_parameter_ptr identifier_parameter_array identifier_parameter_function
    227 %type<decl> identifier_list
     225%type<decl> identifier_parameter_array identifier_parameter_declarator identifier_parameter_function
     226%type<decl> identifier_parameter_ptr identifier_list
    228227
    229228%type<decl> cfa_abstract_array cfa_abstract_declarator_no_tuple cfa_abstract_declarator_tuple
     
    271270%type<en> type_name_list
    272271
    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
    275273
    276274%type<decl> variable_declarator variable_ptr variable_array variable_function
     
    16351633        | UNION
    16361634                { $$ = DeclarationNode::Union; }
    1637         | COROUTINE
    1638                 { $$ = DeclarationNode::Struct; }
    1639         | MONITOR
    1640                 { $$ = DeclarationNode::Struct; }
    1641         | THREAD
    1642                 { $$ = DeclarationNode::Struct; }
    16431635        ;
    16441636
  • src/libcfa/concurrency/CtxSwitch-i386.S

    ra9b657a rc857ad3  
    5252        movl 4(%esp),%eax
    5353
    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 
    6054        // Save volatile registers on the stack.
    6155
     
    7569        // argument is now at 8 + 12 = 20(%esp)
    7670
    77         movl 28(%esp),%eax
     71        movl 20(%esp),%eax
    7872
    7973        // Load new context from the "to" area.
     
    8781        popl %edi
    8882        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
    9583
    9684        // Return to thread.
  • src/libcfa/concurrency/CtxSwitch-x86_64.S

    ra9b657a rc857ad3  
    4747CtxSwitch:
    4848
    49         // Save floating & SSE control words on the stack.
     49        // Save volatile registers on the stack.
    5050
    5151        subq   $8,%rsp
    5252        stmxcsr 0(%rsp)         // 4 bytes
    5353        fnstcw  4(%rsp)         // 2 bytes
    54 
    55         // Save volatile registers on the stack.
    56 
    5754        pushq %r15
    5855        pushq %r14
     
    7875        popq %r14
    7976        popq %r15
    80 
    81         // Load floating & SSE control words from the stack.
    82 
    8377        fldcw   4(%rsp)
    8478        ldmxcsr 0(%rsp)
    85         addq   $8,%rsp
     79        addq $8,%rsp
    8680
    8781        // Return to thread.
  • src/libcfa/concurrency/invoke.c

    ra9b657a rc857ad3  
    9191        struct FakeStack {
    9292            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
    9694            void *dummyReturn;                          // fake return compiler would have pushed on call to uInvoke
    9795            void *argument[3];                          // for 16-byte ABI, 16-byte alignment starts here
     
    110108      struct FakeStack {
    111109            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 uSwitch
     110            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
    115113            void *dummyReturn;                          // NULL return address to provide proper alignment
    116114      };
  • src/libcfa/fstream

    ra9b657a rc857ad3  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 14:48:08 2017
    13 // Update Count     : 91
     12// Last Modified On : Thu Apr 28 08:08:04 2016
     13// Update Count     : 88
    1414//
    1515
     
    2323        void *file;
    2424        _Bool sepDefault;
    25         _Bool sepOnOff;
     25        int sepOnOff;                                                                           // FIX ME: type should be _Bool
    2626        char separator[separateSize];
    2727}; // ofstream
     
    3232void sepReset( ofstream * );
    3333void sepReset( ofstream *, _Bool );
     34void sepSet( ofstream *, const char * );
    3435const char * sepGet( ofstream * );
    35 void sepSet( ofstream *, const char * );
    3636_Bool sepDisable( ofstream * );
    3737_Bool sepEnable( ofstream * );
    38 
    3938int fail( ofstream * );
    4039int flush( ofstream * );
  • src/libcfa/fstream.c

    ra9b657a rc857ad3  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar  7 14:48:09 2017
    13 // Update Count     : 192
     12// Last Modified On : Fri Jul 15 13:35:29 2016
     13// Update Count     : 188
    1414//
    1515
     
    2121#include <stdarg.h>                                                                             // varargs
    2222#include <string.h>                                                                             // strlen
    23 #include <stdbool.h>                                                                    // true/false
    2423#include <float.h>                                                                              // DBL_DIG, LDBL_DIG
    2524#include <complex.h>                                                                    // creal, cimag
     
    3332void sepReset( ofstream * os ) { os->sepOnOff = os->sepDefault; }
    3433void sepReset( ofstream * os, _Bool reset ) { os->sepDefault = reset; os->sepOnOff = os->sepDefault; }
    35 const char * sepGet( ofstream * os ) { return &(os->separator[0]); }
    36 
    3734void sepSet( ofstream * os, const char * s ) {
    3835        strncpy( &(os->separator[0]), s, separateSize - 1 );
    3936        os->separator[separateSize - 1] = '\0';
    4037} // sepSet
    41 
     38const char * sepGet( ofstream * os ) { return &(os->separator[0]); }
    4239_Bool sepDisable( ofstream *os ) {
    4340        _Bool temp = os->sepDefault;
    44         os->sepDefault = false;
     41        os->sepDefault = 0;
    4542        sepReset( os );
    4643        return temp;
    4744} // sepDisable
    48 
    4945_Bool sepEnable( ofstream *os ) {
    5046        _Bool temp = os->sepDefault;
    51         os->sepDefault = true;
     47        os->sepDefault = 1;
    5248        sepReset( os );
    5349        return temp;
Note: See TracChangeset for help on using the changeset viewer.