lib/C/iec_std_functions.h
author Mario de Sousa <msousa@fe.up.pt>
Tue, 25 Dec 2018 12:15:29 +0000
changeset 1077 b37de6a9ad7f
parent 1069 0b275a2c7c2b
child 1073 24ef30a9bcee
child 1085 9766936990db
permissions -rwxr-xr-x
partial fix to issue #76 - calculate task periods with 1ms (instead of 1ns) resolution. Allows for tasks with periods larger than 4.295s, but smaller than 50 days.
107
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     1
/*
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
     2
 * copyright 2008 Edouard TISSERANT
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
     3
 * copyright 2011 Mario de Sousa (msousa@fe.up.pt)
107
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     4
 *
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     5
 * Offered to the public under the terms of the GNU Lesser General Public
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     6
 * License as published by the Free Software Foundation; either version 2
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     7
 * of the License, or (at your option) any later version.
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     8
 *
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
     9
 * This program is distributed in the hope that it will be useful, but
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    10
 * WITHOUT ANY WARRANTY; without even the implied warranty of
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    12
 * General Public License for more details.
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    13
 *
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    14
 * This code is made available on the understanding that it will not be
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    15
 * used in safety-critical situations without a full and competent review.
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    16
 */
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    17
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
    18
/****
107
ff5c92df0c78 Fixed headers of generated code
etisserant
parents: 66
diff changeset
    19
 * IEC 61131-3 standard function library
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
    20
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
    21
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    22
/* NOTE: This file is full of (what may seem at first) very strange macros.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    23
 *       If you want to know what all these strange macros are doing,
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    24
 *       just parse this file through a C preprocessor (e.g. cpp), 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    25
 *       and analyse the output!
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    26
 *       $gcc -E iec_std_lib.h 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    27
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    28
905
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
    29
#ifndef _IEC_STD_FUNCTIONS_H
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
    30
#define _IEC_STD_FUNCTIONS_H
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    31
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    32
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    33
/*****************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    34
/*****************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    35
/*****                                                       *****/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    36
/*****                 IEC 61131-3                           *****/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    37
/*****      S T A N D A R D     F U N C T I O N S            *****/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    38
/*****                                                       *****/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    39
/*****************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    40
/*****************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    41
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    42
/* NOTE: If you want to know what all these strange macros are doing,
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    43
 *       just parse this file through a C preprocessor, and analyse the output!
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    44
 *       $gcc -E iec_std_lib.h 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    45
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    46
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    47
/* NOTE: We only define and declare the explicitly typed standard functions
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    48
 *       (e.g., SIN_REAL, SIN_LREAL, ..., ADD_SINT, ADD_INT, ADD_LINT, ...)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    49
 *       We do not declare/define the overloaded functions
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    50
 *       (SIN, ADD, ...). 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    51
 *       When handling a call to an overloaded function, the iec2c compiler 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    52
 *       will determine in stage3 the data type of the parameter being passed, 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    53
 *       and in stage4 generate the C code to call the correct
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    54
 *       typed standard function.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    55
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    56
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    57
/* NOTE on explicit typing of:
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    58
 *           - Table 25 - Standard bit shift functions
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    59
 *           - Table 29 - Character string Functions
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    60
 *
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    61
 *  In section 2.5.1.4 (Typing, overloading, and type conversion) of the IEC 61131-3 (version 2)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    62
 *  of the standard, it is stated:
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    63
 * "A standard function, [...] is said to be overloaded when it
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    64
 * can operate on input data elements of various types within a generic type designator as defined in
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    65
 * 2.3.2. For instance, an overloaded addition function on generic type ANY_NUM can operate on data
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    66
 * of types LREAL, REAL, DINT, INT, and SINT."
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    67
 * [...]
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    68
 * "When a function which normally represents an overloaded operator is to be typed, i.e., the types
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    69
 * of its inputs and outputs restricted to a particular elementary or derived data type as defined in
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    70
 * 2.3, this shall be done by appending an "underline" character followed by the required type, as
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    71
 * shown in table 21."
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    72
 *
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    73
 * However, this explanation (as well as the example in table 21) only refers to functions where the same
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    74
 * generic data type is used for the single input and the output parameter.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    75
 * How can we create explicitly types functions when this is not the case?
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    76
 * It does not seem to be covered by the standard.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    77
 *
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    78
 * For this reason, we do not define the LEN_SINT, LEN_INT, LEN_STRING, LEN_[ANY_INT], LEN_[ANY_STRING] functions...
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    79
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    80
 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    81
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    82
/********************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    83
/*   EN/ENO PARAMS  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
    84
/********************/
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    85
#ifdef DISABLE_EN_ENO_PARAMETERS
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    86
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    87
  /* Do _not_ generate the EN and ENO parameters! */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    88
  #define EN_ENO_PARAMS
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    89
  #define EN_ENO
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
    90
  #define EN_PFX _NO_EN
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    91
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    92
  #define TEST_EN(TYPENAME)
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    93
  #define TEST_EN_COND(TYPENAME, COND)
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    94
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    95
#else
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    96
    
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    97
  /* _Do_ generate the EN and ENO parameters! */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    98
  #define EN_ENO_PARAMS BOOL EN, BOOL *ENO,
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
    99
  #define EN_ENO EN, ENO,
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   100
  #define EN_PFX _EN
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   101
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   102
  #define TEST_EN(TYPENAME)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   103
    if (!EN) {\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   104
      if (ENO != NULL)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   105
        *ENO = __BOOL_LITERAL(FALSE);\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   106
      return __INIT_##TYPENAME;\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   107
    }\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   108
    else if (ENO != NULL)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   109
      *ENO = __BOOL_LITERAL(TRUE);
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   110
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   111
  #define TEST_EN_COND(TYPENAME, COND)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   112
    if (!EN || (COND)) {\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   113
      if (ENO != NULL)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   114
        *ENO = __BOOL_LITERAL(FALSE);\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   115
      return __INIT_##TYPENAME;\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   116
    }\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   117
    else if (ENO != NULL)\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   118
      *ENO = __BOOL_LITERAL(TRUE);
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   119
    
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   120
#endif
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   121
  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   122
  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   123
/*****************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   124
/*****************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   125
/*  2.5.1.5.1 Type Conversion Functions  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   126
/*****************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   127
/*****************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   128
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   129
#define __convert_type(from_TYPENAME,to_TYPENAME, oper) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   130
static inline to_TYPENAME from_TYPENAME##_TO_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   131
  TEST_EN(to_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   132
  return (to_TYPENAME)oper(op);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   133
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   134
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   135
/******** [ANY_NUM | ANY_NBIT]_TO_BOOL   ************/
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   136
#define __convert_num_to_bool(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   137
static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS TYPENAME op){\
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   138
  TEST_EN(BOOL)\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   139
  return op == 0 ? 0 : 1;\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   140
}
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   141
__ANY_NUM(__convert_num_to_bool)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   142
__ANY_NBIT(__convert_num_to_bool)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   143
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   144
/******** [TIME | ANY_DATE]_TO_BOOL   ************/
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   145
#define __convert_time_to_bool(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   146
static inline BOOL TYPENAME##_TO_BOOL(EN_ENO_PARAMS TYPENAME op){\
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   147
  TEST_EN(BOOL)\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   148
  return op.tv_sec == 0 && op.tv_nsec == 0 ? 0 : 1;\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   149
}
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   150
__convert_time_to_bool(TIME)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   151
__ANY_DATE(__convert_time_to_bool)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   152
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   153
#define __to_anynum_(from_TYPENAME)   __ANY_NUM_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   154
#define __to_anyint_(from_TYPENAME)   __ANY_INT_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   155
#define __to_anybit_(from_TYPENAME)   __ANY_BIT_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   156
#define __to_anynbit_(from_TYPENAME) __ANY_NBIT_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   157
#define __to_anysint_(from_TYPENAME) __ANY_SINT_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   158
#define __to_anyuint_(from_TYPENAME) __ANY_UINT_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   159
#define __to_anyreal_(from_TYPENAME) __ANY_REAL_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   160
#define __to_anydate_(from_TYPENAME) __ANY_DATE_1(__iec_,from_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   161
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   162
/******** [ANY_BIT]_TO_[ANY_NUM | ANT_NBIT]   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   163
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __move_##to_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   164
__ANY_BIT(__to_anynum_)
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   165
__ANY_BIT(__to_anynbit_)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   166
#undef __iec_
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   167
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   168
/******** [ANY_INT]_TO_[ANY_NUM | ANT_NBIT]   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   169
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __move_##to_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   170
__ANY_INT(__to_anynum_)
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   171
__ANY_INT(__to_anynbit_)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   172
#undef __iec_
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   173
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   174
/******** [ANY_REAL]_TO_[ANY_NBIT]   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   175
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __real_to_bit)
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   176
__ANY_REAL(__to_anynbit_)
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   177
#undef __iec_
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   178
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   179
/******** [ANY_REAL]_TO_[ANY_NINT]   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   180
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __real_to_sint)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   181
__ANY_REAL(__to_anysint_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   182
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   183
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __real_to_uint)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   184
__ANY_REAL(__to_anyuint_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   185
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   186
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   187
/******** [ANY_REAL]_TO_[ANY_REAL]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   188
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __move_##to_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   189
__ANY_REAL(__to_anyreal_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   190
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   191
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   192
/******** [ANY_BIT | ANY_INT]_TO_[TIME | ANY_DATE]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   193
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, TIME, __int_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   194
__ANY_BIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   195
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   196
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   197
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __int_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   198
__ANY_BIT(__to_anydate_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   199
__ANY_INT(__to_anydate_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   200
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   201
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   202
/******** [ANY_REAL]_TO_[TIME | ANY_DATE]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   203
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, TIME, __real_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   204
__ANY_REAL(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   205
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   206
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __real_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   207
__ANY_REAL(__to_anydate_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   208
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   209
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   210
/******** [TIME | ANY_DATE]_TO_[ANY_BIT | ANY_INT]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   211
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __time_to_int)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   212
__to_anyint_(TIME)
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   213
__to_anynbit_(TIME)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   214
__ANY_DATE(__to_anyint_)
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   215
__ANY_DATE(__to_anynbit_)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   216
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   217
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   218
/******** [TIME | ANY_DATE]_TO_[ANY_REAL]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   219
#define __iec_(to_TYPENAME,from_TYPENAME) __convert_type(from_TYPENAME, to_TYPENAME, __time_to_real)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   220
__to_anyreal_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   221
__ANY_DATE(__to_anyreal_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   222
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   223
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   224
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   225
/******** [ANY_DATE]_TO_[ANY_DATE | TIME]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   226
/* Not supported: DT_TO_TIME */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   227
__convert_type(DT, DATE,  __date_and_time_to_date)
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   228
static inline DATE DATE_AND_TIME_TO_DATE(EN_ENO_PARAMS DT op){
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   229
	return DT_TO_DATE(EN_ENO op);
705
f2323f79252e Fix DATE conversions standard functions
Laurent Bessard
parents: 704
diff changeset
   230
}
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   231
__convert_type(DT, DT,    __move_DT)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   232
__convert_type(DT, TOD,   __date_and_time_to_time_of_day)
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   233
static inline DATE DATE_AND_TIME_TO_TIME_OF_DAY(EN_ENO_PARAMS DT op){
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   234
	return DT_TO_TOD(EN_ENO op);
705
f2323f79252e Fix DATE conversions standard functions
Laurent Bessard
parents: 704
diff changeset
   235
}
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   236
/* Not supported: DATE_TO_TIME */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   237
__convert_type(DATE, DATE, __move_DATE)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   238
/* Not supported: DATE_TO_DT */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   239
/* Not supported: DATE_TO_TOD */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   240
/* Not supported: TOD_TO_TIME */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   241
/* Not supported: TOD_TO_DATE */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   242
/* Not supported: TOD_TO_DT */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   243
__convert_type(TOD, TOD, __move_TOD)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   244
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   245
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   246
/******** TIME_TO_[ANY_DATE]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   247
/* Not supported: TIME_TO_DATE */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   248
/* Not supported: TIME_TO_DT */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   249
/* Not supported: TIME_TO_TOD */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   250
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   251
/******** TIME_TO_TIME   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   252
__convert_type(TIME, TIME, __move_TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   253
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   254
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   255
/******** [ANY_BIT]_TO_STRING   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   256
__convert_type(BOOL, STRING, __bool_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   257
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, STRING, __bit_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   258
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   259
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   260
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   261
/******** [ANY_INT]_TO_STRING   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   262
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, STRING, __sint_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   263
__ANY_SINT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   264
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   265
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, STRING, __uint_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   266
__ANY_UINT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   267
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   268
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   269
/******** [ANY_REAL]_TO_STRING   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   270
#define __iec_(from_TYPENAME) __convert_type(from_TYPENAME, STRING, __real_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   271
__ANY_REAL(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   272
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   273
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   274
/******** [ANY_DATE]_TO_STRING   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   275
__convert_type(DATE, STRING, __date_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   276
__convert_type(DT,   STRING, __dt_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   277
__convert_type(TOD,  STRING, __tod_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   278
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   279
/******** TIME_TO_STRING   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   280
__convert_type(TIME, STRING, __time_to_string)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   281
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   282
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   283
/******** STRING_TO_[ANY_BIT]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   284
__convert_type(STRING, BOOL, __string_to_bool)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   285
#define __iec_(to_TYPENAME) __convert_type(STRING, to_TYPENAME, __string_to_bit)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   286
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   287
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   288
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   289
/******** STRING_TO_[ANY_INT]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   290
#define __iec_(to_TYPENAME) __convert_type(STRING, to_TYPENAME, __string_to_sint)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   291
__ANY_SINT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   292
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   293
#define __iec_(to_TYPENAME) __convert_type(STRING, to_TYPENAME, __string_to_uint)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   294
__ANY_UINT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   295
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   296
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   297
/******** STRING_TO_[ANY_REAL]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   298
#define __iec_(to_TYPENAME) __convert_type(STRING, to_TYPENAME, __string_to_real)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   299
__ANY_REAL(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   300
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   301
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   302
/******** STRING_TO_[ANY_DATE]   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   303
#define __iec_(to_TYPENAME) __convert_type(STRING, to_TYPENAME, __string_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   304
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   305
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   306
                                   
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   307
/******** STRING_TO_TIME   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   308
__convert_type(STRING, TIME, __string_to_time)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   309
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   310
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   311
/********   TRUNC   ************/ 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   312
#define __iec_(to_TYPENAME,from_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   313
static inline to_TYPENAME TRUNC__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   314
  TEST_EN(to_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   315
  return (to_TYPENAME)__move_##to_TYPENAME(op);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   316
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   317
__ANY_REAL(__to_anyint_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   318
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   319
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   320
704
1adc8df05d2b Fix definition of BCD to ANY_UINT and ANY_UINT to BCD conversion standard functions
Laurent Bessard
parents: 639
diff changeset
   321
/********   _TO_BCD   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   322
#define __iec_(to_TYPENAME,from_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   323
static inline to_TYPENAME from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   324
  TEST_EN(to_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   325
  return (to_TYPENAME)__uint_to_bcd(op);\
704
1adc8df05d2b Fix definition of BCD to ANY_UINT and ANY_UINT to BCD conversion standard functions
Laurent Bessard
parents: 639
diff changeset
   326
}\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   327
static inline to_TYPENAME from_TYPENAME##_TO_BCD__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   328
  return from_TYPENAME##_TO_BCD_##to_TYPENAME(EN_ENO op);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   329
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   330
__ANY_UINT(__to_anynbit_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   331
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   332
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   333
704
1adc8df05d2b Fix definition of BCD to ANY_UINT and ANY_UINT to BCD conversion standard functions
Laurent Bessard
parents: 639
diff changeset
   334
/********   BCD_TO_   ************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   335
#define __iec_(to_TYPENAME,from_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   336
static inline to_TYPENAME from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
715
134f110060db Added support for testing BCD value validity in BCD_TO_UINT function
Laurent Bessard
parents: 714
diff changeset
   337
  TEST_EN_COND(to_TYPENAME, __test_bcd(op))\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   338
  return (to_TYPENAME)__bcd_to_uint(op);\
704
1adc8df05d2b Fix definition of BCD to ANY_UINT and ANY_UINT to BCD conversion standard functions
Laurent Bessard
parents: 639
diff changeset
   339
}\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   340
static inline to_TYPENAME BCD_TO_##to_TYPENAME##__##to_TYPENAME##__##from_TYPENAME(EN_ENO_PARAMS from_TYPENAME op){\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   341
  return from_TYPENAME##_BCD_TO_##to_TYPENAME(EN_ENO op);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   342
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   343
__ANY_NBIT(__to_anyuint_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   344
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   345
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   346
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   347
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   348
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   349
/*  2.5.1.5.2 Numerical Functions  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   350
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   351
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   352
271
4f281513277f Fixes to make handling of standard functions in Semantic analyser compatible with code generation of standard functions
Edouard Tisserant
parents: 254
diff changeset
   353
/* workaround for va-args limitation on shorter than int params */
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   354
#define VA_ARGS_REAL LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   355
#define VA_ARGS_LREAL LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   356
#define VA_ARGS_SINT DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   357
#define VA_ARGS_INT DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   358
#define VA_ARGS_DINT DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   359
#define VA_ARGS_LINT LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   360
#define VA_ARGS_USINT UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   361
#define VA_ARGS_UINT UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   362
#define VA_ARGS_UDINT UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   363
#define VA_ARGS_ULINT ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   364
#define VA_ARGS_TIME TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   365
#define VA_ARGS_BOOL DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   366
#define VA_ARGS_BYTE DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   367
#define VA_ARGS_WORD DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   368
#define VA_ARGS_DWORD DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   369
#define VA_ARGS_LWORD LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   370
#define VA_ARGS_STRING STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   371
#define VA_ARGS_WSTRING WSTRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   372
#define VA_ARGS_DATE DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   373
#define VA_ARGS_TOD TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   374
#define VA_ARGS_DT DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
   375
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   376
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   377
#define __numeric(fname,TYPENAME, FUNC) \
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   378
/* explicitly typed function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   379
static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   380
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   381
  return FUNC(op);\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   382
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   383
/* overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   384
static inline TYPENAME fname##_##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   385
  return fname##TYPENAME(EN_ENO op);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   386
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   387
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   388
/******************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   389
/***   Table 23 - Standard functions of one numeric variable    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   390
/******************************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   391
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   392
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   393
  /*    ABS     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   394
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   395
#define __abs_signed(TYPENAME) \
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   396
/* explicitly typed function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   397
static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   398
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   399
  if (op < 0)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   400
    return -op;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   401
  return op;\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   402
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   403
/* overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   404
static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   405
  return ABS_##TYPENAME(EN_ENO op);\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   406
}
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   407
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   408
#define __abs_unsigned(TYPENAME) \
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   409
/* explicitly typed function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   410
static inline TYPENAME ABS_##TYPENAME(EN_ENO_PARAMS TYPENAME op){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   411
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   412
  return op;\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   413
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   414
/* overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   415
static inline TYPENAME ABS__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op) {\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   416
  return ABS_##TYPENAME(EN_ENO op);\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   417
}
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   418
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   419
__ANY_REAL(__abs_signed)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   420
__ANY_SINT(__abs_signed)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   421
__ANY_UINT(__abs_unsigned)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   422
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   423
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   424
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   425
  /*    SQRT    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   426
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   427
#define __sqrt(TYPENAME) __numeric(SQRT_, TYPENAME, sqrt)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   428
__ANY_REAL(__sqrt)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   429
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   430
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   431
/**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   432
  /*     LN     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   433
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   434
#define __ln(TYPENAME) __numeric(LN_, TYPENAME, log)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   435
__ANY_REAL(__ln)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   436
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   437
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   438
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   439
  /*     LOG    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   440
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   441
#define __log(TYPENAME) __numeric(LOG_, TYPENAME, log10)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   442
__ANY_REAL(__log)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   443
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   444
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   445
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   446
  /*     EXP    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   447
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   448
#define __exp(TYPENAME) __numeric(EXP_, TYPENAME, exp)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   449
__ANY_REAL(__exp)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   450
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   451
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   452
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   453
  /*     SIN    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   454
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   455
#define __sin(TYPENAME) __numeric(SIN_, TYPENAME, sin)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   456
__ANY_REAL(__sin)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   457
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   458
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   459
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   460
  /*     COS    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   461
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   462
#define __cos(TYPENAME) __numeric(COS_, TYPENAME, cos)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   463
__ANY_REAL(__cos)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   464
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   465
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   466
  /*     TAN    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   467
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   468
#define __tan(TYPENAME) __numeric(TAN_, TYPENAME, tan)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   469
__ANY_REAL(__tan)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   470
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   471
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   472
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   473
  /*    ASIN    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   474
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   475
#define __asin(TYPENAME) __numeric(ASIN_, TYPENAME, asin)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   476
__ANY_REAL(__asin)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   477
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   478
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   479
  /*    ACOS    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   480
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   481
#define __acos(TYPENAME) __numeric(ACOS_, TYPENAME, acos)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   482
__ANY_REAL(__acos)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   483
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   484
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   485
  /*    ATAN    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   486
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   487
#define __atan(TYPENAME) __numeric(ATAN_, TYPENAME, atan)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   488
__ANY_REAL(__atan)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   489
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   490
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   491
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   492
/*****************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   493
/***   Table 24 - Standard arithmetic functions    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   494
/*****************************************************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   495
1068
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   496
/* NOTE: unlike all other standard functions, the arithmetic based (extensible) functions
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   497
 *       (ADD, MUL, AND, OR, XOR) have several implementations:
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   498
 *        - 8 optimized versions for when the functon is called with 1 to 8 INput parameters
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   499
 *        - an extra non-optimized version for every other case. 
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   500
 *       
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   501
 *       This means that instead of the functions usually named 
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   502
 *           ADD_TTTT() 
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   503
 *           ADD__TTTT__TTTT()        (where TTTT is a type, e.g. INT)
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   504
 *       we have instead
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   505
 *           ADD_TTTT1(),  ADD_TTTT2(), ... ,ADD_TTTT8()
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   506
 *           ADD_TTTTX()              
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   507
 *           ADD_TTTT_VAR()           
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   508
 *           ADD__TTTT__TTTT1(), ..., ADD__TTTT__TTTT8()       
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   509
 *           ADD__TTTT__TTTT_VAR()    
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   510
 *       
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   511
 *       The standard names
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   512
 *           ADD_TTTT() 
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   513
 *           ADD__TTTT__TTTT()
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   514
 *       are instead later (in this .h file) declared as macros, which will choose
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   515
 *       at compilation time the correct version/implementation to call
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   516
 *       based on the number of input parameters in that specific call.
222879991f44 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
Mario de Sousa <msousa@fe.up.pt>
parents: 1067
diff changeset
   517
 */
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   518
#define __arith_expand(fname, TYPENAME, OP)				\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   519
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   520
	static inline TYPENAME fname##1(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   521
					TYPENAME op1) {			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   522
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   523
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   524
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   525
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   526
	static inline TYPENAME fname##2(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   527
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   528
					TYPENAME op2) {			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   529
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   530
		op1 = op1 OP op2;					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   531
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   532
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   533
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   534
	static inline TYPENAME fname##3(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   535
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   536
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   537
					TYPENAME op3){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   538
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   539
		op1 = op1 OP op2 OP op3;				\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   540
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   541
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   542
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   543
	static inline TYPENAME fname##4(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   544
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   545
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   546
					TYPENAME op3,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   547
					TYPENAME op4){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   548
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   549
		op1 = op1 OP op2 OP op3 OP op4;				\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   550
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   551
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   552
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   553
	static inline TYPENAME fname##5(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   554
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   555
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   556
					TYPENAME op3,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   557
					TYPENAME op4,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   558
					TYPENAME op5){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   559
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   560
		op1 = op1 OP op2 OP op3 OP op4 OP op5;			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   561
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   562
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   563
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   564
	static inline TYPENAME fname##6(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   565
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   566
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   567
					TYPENAME op3,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   568
					TYPENAME op4,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   569
					TYPENAME op5,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   570
					TYPENAME op6){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   571
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   572
		op1 = op1 OP op2 OP op3 OP op4 OP op5 OP op6;		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   573
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   574
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   575
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   576
	static inline TYPENAME fname##7(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   577
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   578
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   579
					TYPENAME op3,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   580
					TYPENAME op4,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   581
					TYPENAME op5,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   582
					TYPENAME op6,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   583
					TYPENAME op7){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   584
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   585
		op1 = op1 OP op2 OP op3 OP op4 OP op5 OP op6 OP op7;	\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   586
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   587
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   588
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   589
	static inline TYPENAME fname##8(EN_ENO_PARAMS			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   590
					TYPENAME op1,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   591
					TYPENAME op2,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   592
					TYPENAME op3,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   593
					TYPENAME op4,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   594
					TYPENAME op5,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   595
					TYPENAME op6,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   596
					TYPENAME op7,			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   597
					TYPENAME op8){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   598
		TEST_EN(TYPENAME);					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   599
		op1 =   op1 OP op2 OP op3 OP op4 OP			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   600
			op5 OP op6 OP op7 OP op8;			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   601
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   602
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   603
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   604
	static inline TYPENAME fname##_VAR(EN_ENO_PARAMS		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   605
					UINT param_count,		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   606
					TYPENAME op1, ...){		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   607
		va_list ap;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   608
		UINT i;							\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   609
		TEST_EN(TYPENAME)					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   610
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   611
			va_start (ap, op1);         /* Initialize the argument list.  */ \
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   612
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   613
		for (i = 0; i < param_count - 1; i++){			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   614
			op1 = op1 OP va_arg (ap, VA_ARGS_##TYPENAME);	\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   615
		}							\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   616
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   617
		va_end (ap);                  /* Clean up.  */		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   618
		return op1;						\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   619
	}								\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   620
									\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   621
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   622
/* macros needed for #if-like behaviour inside of macro */
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   623
#define ARITH_OPERATION_COND_IGNORE(...)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   624
#define ARITH_OPERATION_COND_IDENT(...) __VA_ARGS__
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   625
#define ARITH_OPERATION_COND_SKIP_
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   626
#define ARITH_OPERATION_COND_CLAUSE1(...) __VA_ARGS__ ARITH_OPERATION_COND_IGNORE
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   627
#define ARITH_OPERATION_COND_CLAUSE2(...) ARITH_OPERATION_COND_IDENT
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   628
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   629
#define ARITH_OPERATION_COND_(A,B,C,...) C
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   630
#define ARITH_OPERATION_COND(EXP)			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   631
	ARITH_OPERATION_COND_(				\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   632
		EXP,					\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   633
		ARITH_OPERATION_COND_CLAUSE1,		\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   634
		ARITH_OPERATION_COND_CLAUSE2, ~)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   635
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   636
#define ARITH_OPERATION_LE_(X, Y) ARITH_OPERATION_COND_ ## X ## _LE_ ## Y
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   637
#define ARITH_OPERATION_LE( X, Y) ARITH_OPERATION_LE_(X, Y)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   638
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   639
/*
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   640
 * Macro to remove typecast in argument number placed by code generator:
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   641
 * (UINT)3 -> 3
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   642
 */
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   643
#define CLEAR_TYPECAST(X)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   644
#define MAX_INLINE_PARAM_COUNT 8
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   645
#ifdef DISABLE_EN_ENO_PARAMETERS
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   646
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   647
#define ARITH_OPERATION_CALL__(FNAME, PARAM_COUNT, ...)			\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   648
	ARITH_OPERATION_COND(ARITH_OPERATION_LE(PARAM_COUNT, MAX_INLINE_PARAM_COUNT)) \
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   649
	(FNAME##_VAR(PARAM_COUNT, __VA_ARGS__))				\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   650
	(FNAME##PARAM_COUNT(      __VA_ARGS__))
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   651
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   652
#define ARITH_OPERATION_CALL_( FNAME, PARAM_COUNT, ...)    ARITH_OPERATION_CALL__(FNAME, PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   653
#define ARITH_OPERATION_CALL(  FNAME, PARAM_COUNT, ...)    ARITH_OPERATION_CALL_( FNAME, CLEAR_TYPECAST PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   654
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   655
#else
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   656
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   657
#define ARITH_OPERATION_CALL__(EN, ENO, FNAME, PARAM_COUNT, ...)	\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   658
	ARITH_OPERATION_COND(ARITH_OPERATION_LE(PARAM_COUNT, MAX_INLINE_PARAM_COUNT)) \
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   659
	(FNAME##_VAR(       (EN), (ENO), PARAM_COUNT, __VA_ARGS__))	\
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   660
	(FNAME##PARAM_COUNT((EN), (ENO), __VA_ARGS__))
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   661
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   662
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   663
#define ARITH_OPERATION_CALL_( EN, ENO, FNAME, PARAM_COUNT, ...)    ARITH_OPERATION_CALL__(EN, ENO, FNAME, PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   664
#define ARITH_OPERATION_CALL(  EN, ENO, FNAME, PARAM_COUNT, ...)    ARITH_OPERATION_CALL_(EN, ENO, FNAME, CLEAR_TYPECAST PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   665
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   666
#endif
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   667
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   668
#ifdef DISABLE_EN_ENO_PARAMETERS
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   669
#define ARITH_OPERATION__TYPE__TYPE_NO_EN(FNAME, PARAM_COUNT, ...)             ARITH_OPERATION_CALL(FNAME, PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   670
#else
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   671
#define ARITH_OPERATION__TYPE__TYPE_EN(FNAME, EN, ENO, PARAM_COUNT, ...)       ARITH_OPERATION_CALL(EN, ENO, FNAME, PARAM_COUNT, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   672
#endif
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   673
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   674
#define ARITH_OPERATION__TYPE__TYPE_(PFX, ...)               ARITH_OPERATION__TYPE__TYPE##PFX(__VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   675
#define ARITH_OPERATION__TYPE__TYPE( PFX, ...)               ARITH_OPERATION__TYPE__TYPE_(PFX, __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   676
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   677
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   678
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   679
#define __arith_static(fname,TYPENAME, OP)\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   680
/* explicitly typed function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   681
static inline TYPENAME fname##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   682
  TEST_EN(TYPENAME)\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   683
  return op1 OP op2;\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   684
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   685
/* overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   686
static inline TYPENAME fname##_##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   687
  return fname##TYPENAME(EN_ENO op1, op2);\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   688
}
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   689
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   690
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   691
  /*     ADD    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   692
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   693
#define __add(TYPENAME) \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   694
__arith_expand(ADD_##TYPENAME, TYPENAME, +) 			 /* explicitly typed function */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   695
__arith_expand(ADD__##TYPENAME##__##TYPENAME, TYPENAME, +)	 /* overloaded function */
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   696
__ANY_NUM(__add)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   697
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   698
#define ADD_SINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_SINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   699
#define ADD__SINT__SINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__SINT__SINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   700
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   701
#define ADD_INT(...)           ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_INT,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   702
#define ADD__INT__INT(...)     ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__INT__INT,       __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   703
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   704
#define ADD_DINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_DINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   705
#define ADD__DINT__DINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__DINT__DINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   706
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   707
#define ADD_LINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_LINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   708
#define ADD__LINT__LINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__LINT__LINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   709
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   710
#define ADD_USINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_USINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   711
#define ADD__USINT__USINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__USINT__USINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   712
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   713
#define ADD_UINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_UINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   714
#define ADD__UINT__UINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__UINT__UINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   715
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   716
#define ADD_UDINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_UDINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   717
#define ADD__UDINT__UDINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__UDINT__UDINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   718
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   719
#define ADD_ULINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_ULINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   720
#define ADD__ULINT__ULINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__ULINT__ULINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   721
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   722
#define ADD_REAL(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_REAL,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   723
#define ADD__REAL__REAL(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__REAL__REAL,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   724
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   725
#define ADD_LREAL(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD_LREAL,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   726
#define ADD__LREAL__LREAL(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, ADD__LREAL__LREAL,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   727
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   728
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   729
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   730
  /*     MUL    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   731
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   732
#define __mul(TYPENAME) \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   733
__arith_expand(MUL_##TYPENAME, TYPENAME, *) 			 /* explicitly typed function */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   734
__arith_expand(MUL__##TYPENAME##__##TYPENAME, TYPENAME, *)	 /* overloaded function */
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   735
__ANY_NUM(__mul)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   736
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   737
#define MUL_SINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_SINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   738
#define MUL__SINT__SINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__SINT__SINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   739
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   740
#define MUL_INT(...)           ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_INT,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   741
#define MUL__INT__INT(...)     ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__INT__INT,       __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   742
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   743
#define MUL_DINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_DINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   744
#define MUL__DINT__DINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__DINT__DINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   745
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   746
#define MUL_LINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_LINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   747
#define MUL__LINT__LINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__LINT__LINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   748
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   749
#define MUL_USINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_USINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   750
#define MUL__USINT__USINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__USINT__USINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   751
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   752
#define MUL_UINT(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_UINT,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   753
#define MUL__UINT__UINT(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__UINT__UINT,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   754
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   755
#define MUL_UDINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_UDINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   756
#define MUL__UDINT__UDINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__UDINT__UDINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   757
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   758
#define MUL_ULINT(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_ULINT,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   759
#define MUL__ULINT__ULINT(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__ULINT__ULINT,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   760
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   761
#define MUL_REAL(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_REAL,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   762
#define MUL__REAL__REAL(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__REAL__REAL,     __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   763
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   764
#define MUL_LREAL(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL_LREAL,           __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   765
#define MUL__LREAL__LREAL(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, MUL__LREAL__LREAL,   __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   766
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   767
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   768
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   769
  /*     SUB    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   770
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   771
#define __sub(TYPENAME) __arith_static(SUB_, TYPENAME, -)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   772
__ANY_NUM(__sub)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   773
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   774
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   775
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   776
  /*     DIV    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   777
  /**************/
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   778
#define __div(TYPENAME)\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   779
/* The explicitly typed standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   780
static inline TYPENAME DIV_##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   781
  TEST_EN_COND(TYPENAME, op2 == 0)\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
   782
  return op1 / op2;\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   783
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   784
/* The overloaded standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   785
static inline TYPENAME DIV__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   786
  return DIV_##TYPENAME(EN_ENO op1, op2);\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   787
}
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   788
__ANY_NUM(__div)
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   789
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   790
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   791
  /**************/
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   792
  /*     MOD    */
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   793
  /**************/
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   794
#define __mod(TYPENAME)\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   795
/* The explicitly typed standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   796
static inline TYPENAME MOD_##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   797
  TEST_EN(TYPENAME)\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
   798
  if (op2 == 0) return 0;\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   799
  return op1 % op2;\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   800
}\
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   801
/* The overloaded standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   802
static inline TYPENAME MOD__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   803
  return MOD_##TYPENAME(EN_ENO op1, op2);\
393
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   804
}
f09a5ffe1edc Fixing SUB standard function defined in standard library
laurent
parents: 389
diff changeset
   805
__ANY_INT(__mod)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   806
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   807
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   808
  /*    EXPT    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   809
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   810
/* overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   811
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   812
static inline in1_TYPENAME EXPT__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   813
  (EN_ENO_PARAMS in1_TYPENAME IN1, in2_TYPENAME IN2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   814
  TEST_EN(in1_TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   815
  return __expt(IN1, IN2);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   816
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   817
#define __in1_anyreal_(in2_TYPENAME)   __ANY_REAL_1(__iec_,in2_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   818
__ANY_NUM(__in1_anyreal_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   819
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   820
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   821
  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   822
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   823
  /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   824
  /*     MOVE    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   825
  /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   826
/* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   827
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   828
static inline TYPENAME MOVE_##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   829
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   830
  return op1;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   831
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   832
__ANY(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   833
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   834
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   835
/* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   836
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   837
static inline TYPENAME MOVE__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   838
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   839
  return op1;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   840
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   841
__ANY(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   842
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   843
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   844
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   845
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   846
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   847
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   848
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   849
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   850
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   851
/*  2.5.1.5.3 Bit String Functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   852
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   853
/***********************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   854
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   855
/****************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   856
/***   Table 25 - Standard bit shift functions    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   857
/****************************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   858
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   859
/* We do not delcare explcitly typed versions of the functions in table 25.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   860
 * See note above regarding explicitly typed functions for more details.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   861
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   862
#define __in1_anynbit_(in2_TYPENAME)   __ANY_NBIT_1(__iec_,in2_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   863
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   864
#define __shift_(fname, in1_TYPENAME, in2_TYPENAME, OP)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   865
static inline in1_TYPENAME fname(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N) {\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   866
  TEST_EN(in1_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   867
  return IN OP N;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   868
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   869
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   870
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   871
  /*     SHL    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   872
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   873
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   874
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   875
static inline BOOL SHL__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   876
  TEST_EN(BOOL);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   877
  return (N==0)? IN : __INIT_BOOL;  /* shifting by N>1 will always introduce a 0 */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   878
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   879
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   880
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   881
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   882
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   883
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   884
__shift_(SHL__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME, in1_TYPENAME, in2_TYPENAME, << )/* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   885
__ANY_INT(__in1_anynbit_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   886
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   887
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   888
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   889
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   890
  /*     SHR    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   891
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   892
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   893
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   894
static inline BOOL SHR__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   895
  TEST_EN(BOOL);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   896
  return (N==0)? IN : __INIT_BOOL;  /* shifting by N>1 will always introduce a 0 */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   897
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   898
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   899
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   900
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   901
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   902
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   903
__shift_(SHR__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME, in1_TYPENAME, in2_TYPENAME, >> )/* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   904
__ANY_INT(__in1_anynbit_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   905
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   906
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   907
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   908
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   909
  /*     ROR    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   910
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   911
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   912
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   913
static inline BOOL ROR__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   914
  TEST_EN(BOOL);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   915
  return IN; /* rotating a single bit by any value N will not change that bit! */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   916
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   917
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   918
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   919
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   920
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   921
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   922
static inline in1_TYPENAME ROR__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   923
  TEST_EN(in1_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   924
  N %= 8*sizeof(in1_TYPENAME);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   925
  return (IN >> N) | (IN << (8*sizeof(in1_TYPENAME)-N));\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   926
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   927
__ANY_INT(__in1_anynbit_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   928
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   929
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   930
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   931
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   932
  /*     ROL    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   933
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   934
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   935
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   936
static inline BOOL ROL__BOOL__##TYPENAME(EN_ENO_PARAMS BOOL IN, TYPENAME N) { \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   937
  TEST_EN(BOOL);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   938
  return IN; /* rotating a single bit by any value N will not change that bit! */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   939
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   940
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   941
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   942
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   943
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   944
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
   945
static inline in1_TYPENAME ROL__##in1_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME IN, in2_TYPENAME N){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   946
  TEST_EN(in1_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   947
  N %= 8*sizeof(in1_TYPENAME);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   948
  return (IN << N) | (IN >> (8*sizeof(in1_TYPENAME)-N));\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   949
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   950
__ANY_INT(__in1_anynbit_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   951
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   952
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   953
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   954
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   955
/*********************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   956
/***   Table 26    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   957
/*********************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   958
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   959
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   960
  /*     AND    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   961
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   962
__arith_expand(AND_BOOL, BOOL, && )         /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   963
__arith_expand(AND__BOOL__BOOL, BOOL, && )  /* Overloaded function */
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   964
#define AND_BOOL(...)        ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND_BOOL,        __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   965
#define AND__BOOL__BOOL(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND__BOOL__BOOL, __VA_ARGS__)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   966
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   967
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   968
__arith_expand(AND_##TYPENAME, TYPENAME, &)  /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   969
__arith_expand(AND__##TYPENAME##__##TYPENAME, TYPENAME, &)  /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   970
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   971
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   972
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   973
#define AND_BYTE(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND_BYTE,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   974
#define AND__BYTE__BYTE(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND__BYTE__BYTE,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   975
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   976
#define AND_WORD(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND_WORD,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   977
#define AND__WORD__WORD(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND__WORD__WORD,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   978
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   979
#define AND_DWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND_DWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   980
#define AND__DWORD__DWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND__DWORD__DWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   981
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   982
#define AND_LWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND_LWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   983
#define AND__LWORD__LWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, AND__LWORD__LWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   984
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   985
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   986
  /*************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   987
  /*     OR    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   988
  /*************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   989
__arith_expand(OR_BOOL, BOOL, || )         /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   990
__arith_expand(OR__BOOL__BOOL, BOOL, || )  /* Overloaded function */
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   991
#define OR_BOOL(...)        ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR_BOOL,        __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
   992
#define OR__BOOL__BOOL(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR__BOOL__BOOL, __VA_ARGS__)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   993
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   994
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   995
__arith_expand(OR_##TYPENAME, TYPENAME, |)  /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   996
__arith_expand(OR__##TYPENAME##__##TYPENAME, TYPENAME, |)  /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   997
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   998
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
   999
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1000
#define OR_BYTE(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR_BYTE,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1001
#define OR__BYTE__BYTE(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR__BYTE__BYTE,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1002
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1003
#define OR_WORD(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR_WORD,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1004
#define OR__WORD__WORD(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR__WORD__WORD,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1005
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1006
#define OR_DWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR_DWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1007
#define OR__DWORD__DWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR__DWORD__DWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1008
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1009
#define OR_LWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR_LWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1010
#define OR__LWORD__LWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, OR__LWORD__LWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1011
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1012
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1013
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1014
  /*     XOR    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1015
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1016
#define __xorbool_expand(fname) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1017
static inline BOOL fname(EN_ENO_PARAMS UINT param_count, BOOL op1, ...){ \
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1018
  va_list ap; \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1019
  UINT i; \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1020
  TEST_EN(BOOL) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1021
\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1022
  va_start (ap, op1);         /* Initialize the argument list.  */ \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1023
\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1024
  for (i = 0; i < param_count - 1; i++){ \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1025
    BOOL tmp = va_arg (ap, VA_ARGS_BOOL); \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1026
    op1 = (op1 && !tmp) || (!op1 && tmp); \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1027
  } \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1028
\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1029
  va_end (ap);                  /* Clean up.  */ \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1030
  return op1; \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1031
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1032
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1033
__xorbool_expand(XOR_BOOL) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1034
__xorbool_expand(XOR__BOOL__BOOL) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1035
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1036
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1037
__arith_expand(XOR_##TYPENAME, TYPENAME, ^) /* The explicitly typed standard functions */\
1063
b5b48b6f7606 Fix bug: XOR operator was broken for ANY_BIT types. No XOR__[DL]WORD__[DL]WORD functions were generated.
Andrey Skvortsov
parents: 1011
diff changeset
  1038
__arith_expand(XOR__##TYPENAME##__##TYPENAME, TYPENAME, ^) /* Overloaded function */
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1039
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1040
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1041
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1042
#define XOR_BYTE(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR_BYTE,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1043
#define XOR__BYTE__BYTE(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR__BYTE__BYTE,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1044
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1045
#define XOR_WORD(...)          ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR_WORD,             __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1046
#define XOR__WORD__WORD(...)   ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR__WORD__WORD,      __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1047
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1048
#define XOR_DWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR_DWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1049
#define XOR__DWORD__DWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR__DWORD__DWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1050
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1051
#define XOR_LWORD(...)         ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR_LWORD,            __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1052
#define XOR__LWORD__LWORD(...) ARITH_OPERATION__TYPE__TYPE(EN_PFX, XOR__LWORD__LWORD,    __VA_ARGS__)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1053
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1054
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1055
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1056
  /*     NOT    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1057
  /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1058
/* The explicitly typed standard functions */
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1059
static inline BOOL NOT_BOOL(EN_ENO_PARAMS BOOL op1){
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1060
  TEST_EN(BOOL)
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1061
  return !op1;
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1062
}
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1063
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1064
/* Overloaded function */
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1065
static inline BOOL NOT__BOOL__BOOL(EN_ENO_PARAMS BOOL op1){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1066
  TEST_EN(BOOL)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1067
  return !op1;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1068
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1069
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1070
/* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1071
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1072
static inline TYPENAME NOT_##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1073
  TEST_EN(TYPENAME)\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1074
  return ~op1;\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1075
}
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1076
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1077
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1078
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1079
/* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1080
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1081
static inline TYPENAME NOT__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME op1){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1082
  TEST_EN(TYPENAME)\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1083
  return ~op1;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1084
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1085
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1086
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1087
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1088
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1089
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1090
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1091
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1092
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1093
/***************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1094
/***************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1095
/*  2.5.1.5.4  Selection and comparison Functions  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1096
/***************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1097
/***************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1098
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1099
/*********************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1100
/***   Table 27    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1101
/*********************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1102
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1103
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1104
    /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1105
    /*    SEL     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1106
    /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1107
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1108
/* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1109
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1110
static inline TYPENAME SEL_##TYPENAME(EN_ENO_PARAMS BOOL G, TYPENAME op0, TYPENAME op1){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1111
  TEST_EN(TYPENAME)\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1112
  return G ? op1 : op0;\
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1113
}
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1114
__ANY(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1115
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1116
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1117
/* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1118
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1119
static inline TYPENAME SEL__##TYPENAME##__BOOL__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS BOOL G, TYPENAME op0, TYPENAME op1){\
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1120
  TEST_EN(TYPENAME)\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1121
  return G ? op1 : op0;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1122
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1123
__ANY(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1124
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1125
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1126
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1127
    /**************/
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1128
    /*     MAX    */
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1129
    /**************/
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1130
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1131
#define __extrem_(fname,TYPENAME, COND) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1132
static inline TYPENAME fname(EN_ENO_PARAMS UINT param_count, TYPENAME op1, ...){\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1133
  va_list ap;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1134
  UINT i;\
200
fde2d08ebaee Applying patch from Iztok for old gcc versions
laurent
parents: 199
diff changeset
  1135
  TEST_EN(TYPENAME)\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1136
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1137
  va_start (ap, op1);         /* Initialize the argument list.  */\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1138
  \
165
83963465b773 Bug on standard function not defined with EN/ENO fixed
lbessard
parents: 163
diff changeset
  1139
  for (i = 0; i < param_count - 1; i++){\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1140
    TYPENAME tmp = va_arg (ap, VA_ARGS_##TYPENAME);\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1141
    op1 = COND ? tmp : op1;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1142
  }\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1143
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1144
  va_end (ap);                  /* Clean up.  */\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1145
  return op1;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1146
}
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1147
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1148
/* Max for numerical data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1149
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1150
__extrem_(MAX_##TYPENAME,TYPENAME, op1 < tmp) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1151
__extrem_(MAX__##TYPENAME##__##TYPENAME,TYPENAME, op1 < tmp) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1152
__ANY_BIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1153
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1154
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1155
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1156
/* Max for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1157
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1158
__extrem_(MAX_##TYPENAME, TYPENAME, __time_cmp(op1, tmp) < 0) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1159
__extrem_(MAX__##TYPENAME##__##TYPENAME, TYPENAME, __time_cmp(op1, tmp) < 0) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1160
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1161
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1162
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1163
378
7f2e120c7352 moved declaration __STR_CMP to prevent warning
Edouard Tisserant
parents: 375
diff changeset
  1164
#define __STR_CMP(str1, str2) memcmp((char*)&str1.body,(char*)&str2.body, str1.len < str2.len ? str1.len : str2.len)
7f2e120c7352 moved declaration __STR_CMP to prevent warning
Edouard Tisserant
parents: 375
diff changeset
  1165
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1166
/* Max for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1167
__extrem_(MAX_STRING, STRING, __STR_CMP(op1,tmp) < 0) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1168
__extrem_(MAX__STRING__STRING, STRING, __STR_CMP(op1,tmp) < 0) /* Overloaded function */
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1169
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1170
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1171
    /*     MIN    */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1172
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1173
/* Min for numerical data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1174
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1175
__extrem_(MIN_##TYPENAME, TYPENAME, op1 > tmp) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1176
__extrem_(MIN__##TYPENAME##__##TYPENAME, TYPENAME, op1 > tmp) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1177
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1178
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1179
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1180
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1181
/* Min for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1182
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1183
__extrem_(MIN_##TYPENAME, TYPENAME, __time_cmp(op1, tmp) > 0) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1184
__extrem_(MIN__##TYPENAME##__##TYPENAME, TYPENAME, __time_cmp(op1, tmp) > 0) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1185
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1186
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1187
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1188
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1189
/* Min for string data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1190
__extrem_(MIN_STRING, STRING, __STR_CMP(op1,tmp) > 0) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1191
__extrem_(MIN__STRING__STRING, STRING, __STR_CMP(op1,tmp) > 0) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1192
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1193
    /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1194
    /*   LIMIT    */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1195
    /**************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1196
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1197
/* Limit for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1198
#define __iec_(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1199
/* The explicitly typed standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1200
static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1201
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1202
  return IN > MN ? IN < MX ? IN : MX : MN;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1203
}\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1204
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1205
static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1206
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1207
  return IN > MN ? IN < MX ? IN : MX : MN;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1208
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1209
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1210
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1211
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1212
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1213
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1214
/* Limit for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1215
#define __iec_(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1216
/* The explicitly typed standard functions */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1217
static inline TYPENAME LIMIT_##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1218
    TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1219
    return __time_cmp(IN, MN) > 0 ? /* IN>MN ?*/\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1220
           __time_cmp(IN, MX) < 0 ? /* IN<MX ?*/\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1221
           IN : MX : MN;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1222
}\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1223
/* Overloaded function */\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1224
static inline TYPENAME LIMIT__##TYPENAME##__##TYPENAME##__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS TYPENAME MN, TYPENAME IN, TYPENAME MX){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1225
    TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1226
    return __time_cmp(IN, MN) > 0 ? /* IN>MN ?*/\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1227
           __time_cmp(IN, MX) < 0 ? /* IN<MX ?*/\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1228
           IN : MX : MN;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1229
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1230
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1231
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1232
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1233
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1234
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1235
/* Limit for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1236
/* The explicitly typed standard functions */
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1237
static inline STRING LIMIT_STRING(EN_ENO_PARAMS STRING MN, STRING IN, STRING MX){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1238
    TEST_EN(STRING)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1239
    return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1240
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1241
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1242
/* Overloaded function */
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1243
static inline STRING LIMIT__STRING__STRING__STRING__STRING(EN_ENO_PARAMS STRING MN, STRING IN, STRING MX){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1244
    TEST_EN(STRING)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1245
    return __STR_CMP(IN, MN) > 0 ? __STR_CMP(IN, MX) < 0 ? IN : MX : MN;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1246
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1247
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1248
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1249
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1250
    /*     MUX    */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1251
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1252
/* The standard states that the inputs for SEL and MUX must be named starting off from 0,
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1253
 * unlike remaining functions, that start off at 1.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1254
 */    
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1255
/* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1256
#define __in1_anyint_(in2_TYPENAME)   __ANY_INT_1(__iec_,in2_TYPENAME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1257
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1258
static inline in2_TYPENAME MUX__##in2_TYPENAME##__##in1_TYPENAME##__##in2_TYPENAME(EN_ENO_PARAMS in1_TYPENAME K, UINT param_count, ...){\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1259
  va_list ap;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1260
  UINT i;\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1261
  in2_TYPENAME tmp;\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1262
  TEST_EN_COND(in2_TYPENAME, K >= param_count)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1263
  tmp = __INIT_##in2_TYPENAME;\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1264
  \
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1265
  va_start (ap, param_count);         /* Initialize the argument list.  */\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1266
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1267
  for (i = 0; i < param_count; i++){\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1268
    if(K == i){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1269
        tmp = va_arg (ap, VA_ARGS_##in2_TYPENAME);\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1270
        va_end (ap);                  /* Clean up.  */\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1271
        return tmp;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1272
    }else{\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1273
        va_arg (ap, VA_ARGS_##in2_TYPENAME);\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1274
    }\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1275
  }\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1276
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1277
  va_end (ap);                  /* Clean up.  */\
41
8998c8b24b60 First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents: 40
diff changeset
  1278
  return tmp;\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1279
}
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1280
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1281
__ANY(__in1_anyint_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1282
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1283
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1284
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1285
/******************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1286
/***             Table 28               ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1287
/***   Standard comparison functions    ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1288
/******************************************/
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1289
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1290
#define __compare_(fname,TYPENAME, COND) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1291
static inline BOOL fname(EN_ENO_PARAMS UINT param_count, TYPENAME op1, ...){\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1292
  va_list ap;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1293
  UINT i;\
200
fde2d08ebaee Applying patch from Iztok for old gcc versions
laurent
parents: 199
diff changeset
  1294
  TEST_EN(BOOL)\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1295
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1296
  va_start (ap, op1);         /* Initialize the argument list.  */\
43
37dd4e2fd2ec Test IEC_LIB and fix bugs (EQ, GT et all)
etisserant
parents: 42
diff changeset
  1297
  DBG(#fname #TYPENAME "\n")\
37dd4e2fd2ec Test IEC_LIB and fix bugs (EQ, GT et all)
etisserant
parents: 42
diff changeset
  1298
  DBG_TYPE(TYPENAME, op1)\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1299
  \
43
37dd4e2fd2ec Test IEC_LIB and fix bugs (EQ, GT et all)
etisserant
parents: 42
diff changeset
  1300
  for (i = 0; i < param_count - 1; i++){\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1301
    TYPENAME tmp = va_arg (ap, VA_ARGS_##TYPENAME);\
43
37dd4e2fd2ec Test IEC_LIB and fix bugs (EQ, GT et all)
etisserant
parents: 42
diff changeset
  1302
    DBG_TYPE(TYPENAME, tmp)\
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1303
    if(COND){\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1304
        op1 = tmp;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1305
    }else{\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1306
        va_end (ap);                  /* Clean up.  */\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1307
        return 0;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1308
    }\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1309
  }\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1310
  \
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1311
  va_end (ap);                  /* Clean up.  */\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1312
  return 1;\
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1313
}
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1314
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1315
#define __compare_num(fname, TYPENAME, TEST) __compare_(fname, TYPENAME, op1 TEST tmp )
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1316
#define __compare_time(fname, TYPENAME, TEST) __compare_(fname, TYPENAME, __time_cmp(op1, tmp) TEST 0)
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1317
#define __compare_string(fname, TEST) __compare_(fname, STRING, __STR_CMP(op1, tmp) TEST 0 )
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1318
149
05ca171a3d57 Adding support for EN/ENO in standard functions
lbessard
parents: 140
diff changeset
  1319
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1320
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1321
    /*     GT     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1322
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1323
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1324
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1325
__compare_num(GT_##TYPENAME, TYPENAME, > ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1326
__compare_num(GT__BOOL__##TYPENAME, TYPENAME, > ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1327
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1328
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1329
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1330
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1331
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1332
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1333
__compare_time(GT_##TYPENAME, TYPENAME, > ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1334
__compare_time(GT__BOOL__##TYPENAME, TYPENAME, > ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1335
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1336
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1337
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1338
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1339
/* Comparison for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1340
__compare_string(GT_STRING, > ) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1341
__compare_string(GT__BOOL__STRING, > ) /* Overloaded function */
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1342
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1343
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1344
    /*     GE     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1345
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1346
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1347
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1348
__compare_num(GE_##TYPENAME, TYPENAME, >= ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1349
__compare_num(GE__BOOL__##TYPENAME, TYPENAME, >= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1350
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1351
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1352
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1353
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1354
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1355
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1356
__compare_time(GE_##TYPENAME, TYPENAME, >= ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1357
__compare_time(GE__BOOL__##TYPENAME, TYPENAME, >= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1358
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1359
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1360
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1361
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1362
/* Comparison for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1363
__compare_string(GE_STRING, >= ) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1364
__compare_string(GE__BOOL__STRING, >= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1365
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1366
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1367
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1368
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1369
    /*     EQ     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1370
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1371
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1372
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1373
__compare_num(EQ_##TYPENAME, TYPENAME, == ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1374
__compare_num(EQ__BOOL__##TYPENAME, TYPENAME, == ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1375
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1376
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1377
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1378
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1379
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1380
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1381
__compare_time(EQ_##TYPENAME, TYPENAME, == ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1382
__compare_time(EQ__BOOL__##TYPENAME, TYPENAME, == ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1383
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1384
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1385
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1386
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1387
/* Comparison for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1388
__compare_string(EQ_STRING, == ) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1389
__compare_string(EQ__BOOL__STRING, == ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1390
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1391
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1392
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1393
    /*     LT     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1394
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1395
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1396
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1397
__compare_num(LT_##TYPENAME, TYPENAME, < ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1398
__compare_num(LT__BOOL__##TYPENAME, TYPENAME, < ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1399
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1400
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1401
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1402
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1403
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1404
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1405
__compare_time(LT_##TYPENAME, TYPENAME, < ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1406
__compare_time(LT__BOOL__##TYPENAME, TYPENAME, < ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1407
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1408
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1409
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1410
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1411
/* Comparison for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1412
__compare_string(LT_STRING, < ) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1413
__compare_string(LT__BOOL__STRING, < ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1414
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1415
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1416
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1417
    /*     LE     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1418
    /**************/
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1419
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1420
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1421
__compare_num(LE_##TYPENAME, TYPENAME, <= ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1422
__compare_num(LE__BOOL__##TYPENAME, TYPENAME, <= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1423
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1424
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1425
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1426
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1427
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1428
#define __iec_(TYPENAME) \
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1429
__compare_time(LE_##TYPENAME, TYPENAME, <= ) /* The explicitly typed standard functions */\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1430
__compare_time(LE__BOOL__##TYPENAME, TYPENAME, <= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1431
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1432
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1433
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1434
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1435
/* Comparison for string data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1436
__compare_string(LE_STRING, <= ) /* The explicitly typed standard functions */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1437
__compare_string(LE__BOOL__STRING, <= ) /* Overloaded function */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1438
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1439
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1440
    /**************/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1441
    /*     NE     */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
diff changeset
  1442
    /**************/
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1443
#define __ne_num(fname, TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1444
static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1445
  TEST_EN(BOOL)\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1446
  return op1 != op2 ? 1 : 0;\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1447
}
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1448
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1449
#define __ne_time(fname, TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1450
static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1451
  TEST_EN(BOOL)\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1452
  return __time_cmp(op1, op2) != 0 ? 1 : 0;\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1453
}
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1454
638
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1455
#define __ne_string(fname, TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1456
static inline BOOL fname(EN_ENO_PARAMS TYPENAME op1, TYPENAME op2){\
638
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1457
  TEST_EN(BOOL)\
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1458
  return __STR_CMP(op1, op2) != 0 ? 1 : 0;\
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1459
}
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1460
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1461
/* Comparison for numerical data types */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1462
#define __iec_(TYPENAME) \
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1463
__ne_num(NE_##TYPENAME, TYPENAME) /* The explicitly typed standard functions */\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1464
__ne_num(NE__BOOL__##TYPENAME##__##TYPENAME, TYPENAME) /* Overloaded function */
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1465
__ANY_NBIT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1466
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1467
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1468
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1469
/* Comparison for time data types */	
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1470
#define __iec_(TYPENAME) \
398
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1471
__ne_time(NE_##TYPENAME, TYPENAME) /* The explicitly typed standard functions */\
f1f3facc59e7 Fix issues in standard library with MUX, MOD, NE and convertions to BOOL
laurent
parents: 393
diff changeset
  1472
__ne_time(NE__BOOL__##TYPENAME##__##TYPENAME, TYPENAME) /* Overloaded function */
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1473
__ANY_DATE(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1474
__iec_(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1475
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1476
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1477
/* Comparison for string data types */	
638
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1478
__ne_string(NE_STRING, STRING) /* The explicitly typed standard functions */
049748e9410a Fix bug with NE function for STRING variables
Laurent Bessard
parents: 625
diff changeset
  1479
__ne_string(NE__BOOL__STRING__STRING, STRING) /* Overloaded function */
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1480
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1481
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1482
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1483
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1484
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1485
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1486
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1487
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1488
/*  2.5.1.5.5   Character string  Functions  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1489
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1490
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1491
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1492
/*************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1493
/***           Table 29            ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1494
/***  Character string  Functions  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1495
/*************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1496
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1497
/* We do not delcare explcitly typed versions of the functions in table 29.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1498
 * See note above regarding explicitly typed functions for more details.
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1499
 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1500
 
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1501
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1502
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1503
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1504
    /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1505
    /*     LEN     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1506
    /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1507
static inline __strlen_t __len(STRING IN) {return IN.len;}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1508
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1509
/* A function, with 1 input paramter, implementing a generic OPERATION */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1510
#define __genoper_1p_(fname,ret_TYPENAME, par_TYPENAME, OPERATION) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1511
static inline ret_TYPENAME fname(EN_ENO_PARAMS par_TYPENAME par1){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1512
  TEST_EN(ret_TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1513
  return (ret_TYPENAME)OPERATION(par1);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1514
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1515
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1516
#define __iec_(TYPENAME) __genoper_1p_(LEN__##TYPENAME##__STRING, TYPENAME, STRING, __len)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1517
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1518
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1519
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1520
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1521
    /****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1522
    /*     LEFT     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1523
    /****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1524
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1525
#define __left(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1526
static inline STRING LEFT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L){\
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1527
    STRING res;\
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1528
    TEST_EN_COND(STRING, L < 0)\
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1529
    res = __INIT_STRING;\
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1530
    L = L < (TYPENAME)IN.len ? L : (TYPENAME)IN.len;\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1531
    memcpy(&res.body, &IN.body, (size_t)L);\
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1532
    res.len = (__strlen_t)L;\
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1533
    return res;\
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1534
}
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1535
__ANY_INT(__left)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1536
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1537
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1538
    /*****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1539
    /*     RIGHT     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1540
    /*****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1541
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1542
#define __right(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1543
static inline STRING RIGHT__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L){\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1544
  STRING res;\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1545
  TEST_EN_COND(STRING, L < 0)\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1546
  res = __INIT_STRING;\
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1547
  L = L < (TYPENAME)IN.len ? L : (TYPENAME)IN.len;\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1548
  memcpy(&res.body, &IN.body[(TYPENAME)IN.len - L], (size_t)L);\
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1549
  res.len = (__strlen_t)L;\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1550
  return res;\
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1551
}
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1552
__ANY_INT(__right)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1553
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1554
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1555
    /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1556
    /*     MID     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1557
    /***************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1558
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1559
#define __mid(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1560
static inline STRING MID__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING IN, TYPENAME L, TYPENAME P){\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1561
  STRING res;\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1562
  TEST_EN_COND(STRING, L < 0 || P < 0)\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1563
  res = __INIT_STRING;\
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1564
  if(P <= (TYPENAME)IN.len){\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1565
	P -= 1; /* now can be used as [index]*/\
384
4626828277f9 fixed signedness warning on string slicing funcs in std lib
Edouard Tisserant
parents: 379
diff changeset
  1566
	L = L + P <= (TYPENAME)IN.len ? L : (TYPENAME)IN.len - P;\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1567
	memcpy(&res.body, &IN.body[P] , (size_t)L);\
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1568
	res.len = (__strlen_t)L;\
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1569
  }\
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1570
  return res;\
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1571
}
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1572
__ANY_INT(__mid)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1573
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1574
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1575
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1576
    /*     CONCAT     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1577
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1578
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1579
static inline STRING CONCAT(EN_ENO_PARAMS UINT param_count, ...){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1580
  UINT i;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1581
  STRING res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1582
  va_list ap;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1583
  __strlen_t charcount;
379
7dc97c825bb8 Fix bug in definition of CONCAT standard function in iec_std_lib.h
laurent
parents: 378
diff changeset
  1584
  TEST_EN(STRING)
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1585
  charcount = 0;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1586
  res = __INIT_STRING;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1587
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1588
  va_start (ap, param_count);         /* Initialize the argument list.  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1589
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1590
  for (i = 0; i < param_count && charcount < STR_MAX_LEN; i++)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1591
  {
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1592
    STRING tmp = va_arg(ap, STRING);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1593
    __strlen_t charrem = STR_MAX_LEN - charcount;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1594
    __strlen_t to_write = tmp.len > charrem ? charrem : tmp.len;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1595
    memcpy(&res.body[charcount], &tmp.body , to_write);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1596
    charcount += to_write;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1597
  }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1598
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1599
  res.len = charcount;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1600
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1601
  va_end (ap);                  /* Clean up.  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1602
  return res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1603
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1604
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1605
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1606
    /*     INSERT     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1607
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1608
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1609
static inline STRING __insert(STRING IN1, STRING IN2, __strlen_t P){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1610
    STRING res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1611
    __strlen_t to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1612
    res = __INIT_STRING;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1613
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1614
    to_copy = P > IN1.len ? IN1.len : P;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1615
    memcpy(&res.body, &IN1.body , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1616
    P = res.len = to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1617
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1618
    to_copy = IN2.len + res.len > STR_MAX_LEN ? STR_MAX_LEN - res.len : IN2.len;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1619
    memcpy(&res.body[res.len], &IN2.body , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1620
    res.len += to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1621
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1622
    to_copy = IN1.len - P < STR_MAX_LEN - res.len ? IN1.len - P : STR_MAX_LEN - res.len ;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1623
    memcpy(&res.body[res.len], &IN1.body[P] , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1624
    res.len += to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1625
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1626
    return res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1627
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1628
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1629
#define __iec_(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1630
static inline STRING INSERT__STRING__STRING__STRING__##TYPENAME(EN_ENO_PARAMS STRING str1, STRING str2, TYPENAME P){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1631
  TEST_EN_COND(STRING, P < 0)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1632
  return (STRING)__insert(str1,str2,(__strlen_t)P);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1633
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1634
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1635
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1636
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1637
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1638
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1639
    /*     DELETE     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1640
    /******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1641
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1642
static inline STRING __delete(STRING IN, __strlen_t L, __strlen_t P){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1643
    STRING res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1644
    __strlen_t to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1645
    res = __INIT_STRING;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1646
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1647
    to_copy = P > IN.len ? IN.len : P-1;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1648
    memcpy(&res.body, &IN.body , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1649
    P = res.len = to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1650
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1651
    if( IN.len > P + L ){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1652
        to_copy = IN.len - P - L;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1653
        memcpy(&res.body[res.len], &IN.body[P + L], to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1654
        res.len += to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1655
    }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1656
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1657
    return res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1658
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1659
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1660
#define __iec_(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1661
static inline STRING DELETE__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING str, TYPENAME L, TYPENAME P){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1662
  TEST_EN_COND(STRING, L < 0 || P < 0)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1663
  return (STRING)__delete(str,(__strlen_t)L,(__strlen_t)P);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1664
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1665
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1666
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1667
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1668
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1669
    /*******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1670
    /*     REPLACE     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1671
    /*******************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1672
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1673
static inline STRING __replace(STRING IN1, STRING IN2, __strlen_t L, __strlen_t P){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1674
    STRING res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1675
    __strlen_t to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1676
    res = __INIT_STRING;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1677
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1678
    to_copy = P > IN1.len ? IN1.len : P-1;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1679
    memcpy(&res.body, &IN1.body , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1680
    P = res.len = to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1681
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1682
    to_copy = IN2.len < L ? IN2.len : L;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1683
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1684
    if( to_copy + res.len > STR_MAX_LEN )
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1685
       to_copy = STR_MAX_LEN - res.len;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1686
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1687
    memcpy(&res.body[res.len], &IN2.body , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1688
    res.len += to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1689
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1690
    P += L;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1691
    if( res.len <  STR_MAX_LEN && P < IN1.len)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1692
    {
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1693
        to_copy = IN1.len - P;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1694
        memcpy(&res.body[res.len], &IN1.body[P] , to_copy);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1695
        res.len += to_copy;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1696
    }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1697
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1698
    return res;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1699
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1700
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1701
#define __iec_(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1702
static inline STRING REPLACE__STRING__STRING__STRING__##TYPENAME##__##TYPENAME(EN_ENO_PARAMS STRING str1, STRING str2, TYPENAME L, TYPENAME P){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1703
  TEST_EN_COND(STRING, L < 0 || P < 0)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1704
  return (STRING)__replace(str1,str2,(__strlen_t)L,(__strlen_t)P);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1705
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1706
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1707
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1708
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1709
    /****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1710
    /*     FIND     */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1711
    /****************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1712
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1713
static inline __strlen_t __pfind(STRING* IN1, STRING* IN2){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1714
    UINT count1 = 0; /* offset of first matching char in IN1 */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1715
    UINT count2 = 0; /* count of matching char */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1716
    while(count1 + count2 < IN1->len && count2 < IN2->len)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1717
    {
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1718
        if(IN1->body[count1 + count2] != IN2->body[count2]){
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1719
            count1 += count2 + 1;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1720
            count2 = 0;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1721
        }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1722
        else {
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1723
            count2++;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1724
        }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1725
    }
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1726
    return count2 == IN2->len -1 ? 0 : count1 + 1;
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1727
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1728
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1729
#define __iec_(TYPENAME) \
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1730
static inline TYPENAME FIND__##TYPENAME##__STRING__STRING(EN_ENO_PARAMS STRING str1, STRING str2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1731
  TEST_EN(TYPENAME)\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1732
  return (TYPENAME)__pfind(&str1,&str2);\
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1733
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1734
__ANY_INT(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1735
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1736
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1737
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1738
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1739
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1740
/*  2.5.1.5.6  Functions of time data types  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1741
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1742
/*********************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1743
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1744
/**************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1745
/***           Table 30             ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1746
/***  Functions of time data types  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1747
/**************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1748
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1749
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1750
static inline TIME ADD_TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1751
  TEST_EN(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1752
  return __time_add(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1753
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1754
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1755
static inline TOD ADD_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1756
  TEST_EN(TOD)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1757
  return __time_add(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1758
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1759
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1760
static inline DT ADD_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1761
  TEST_EN(DT)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1762
  return __time_add(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1763
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1764
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1765
static inline TIME SUB_TIME(EN_ENO_PARAMS TIME IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1766
  TEST_EN(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1767
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1768
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1769
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1770
static inline TIME SUB_DATE_DATE(EN_ENO_PARAMS DATE IN1, DATE IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1771
  TEST_EN(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1772
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1773
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1774
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1775
static inline TOD SUB_TOD_TIME(EN_ENO_PARAMS TOD IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1776
  TEST_EN(TOD)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1777
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1778
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1779
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1780
static inline TIME SUB_TOD_TOD(EN_ENO_PARAMS TOD IN1, TOD IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1781
  TEST_EN(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1782
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1783
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1784
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1785
static inline DT SUB_DT_TIME(EN_ENO_PARAMS DT IN1, TIME IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1786
  TEST_EN(DT)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1787
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1788
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1789
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1790
static inline TIME SUB_DT_DT(EN_ENO_PARAMS DT IN1, DT IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1791
  TEST_EN(TIME)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1792
  return __time_sub(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1793
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1794
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1795
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1796
/***  MULTIME  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1797
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1798
static inline TIME MULTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1799
  TEST_EN(TIME)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1800
  return __time_mul(IN1, (LREAL)IN2);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1801
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1802
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1803
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1804
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1805
/***  MUL  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1806
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1807
static inline TIME MUL__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1808
  TEST_EN(TIME)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1809
  return __time_mul(IN1, (LREAL)IN2);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1810
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1811
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1812
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1813
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1814
/***  DIVTIME  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1815
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1816
static inline TIME DIVTIME__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1817
  TEST_EN(TIME)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1818
  return __time_div(IN1, (LREAL)IN2);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1819
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1820
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1821
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1822
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1823
/***  DIV  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1824
#define __iec_(TYPENAME)\
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1825
static inline TIME DIV__TIME__TIME__##TYPENAME(EN_ENO_PARAMS TIME IN1, TYPENAME IN2){\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1826
  TEST_EN(TIME)\
696
7530eae6786d Removing several warning in iec_std_lib.h
Manuele Conti <conti.ma@alice.it>
parents: 625
diff changeset
  1827
  return __time_div(IN1, (LREAL)IN2);\
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1828
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1829
__ANY_NUM(__iec_)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1830
#undef __iec_
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1831
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1832
/*** CONCAT_DATE_TOD ***/
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 905
diff changeset
  1833
static inline DT CONCAT_DATE_TOD(EN_ENO_PARAMS DATE IN1, TOD IN2){
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1834
  TEST_EN(DT)
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1835
  return __time_add(IN1, IN2);
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1836
}
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1837
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1838
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1839
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1840
/****************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1841
/****************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1842
/*  2.5.1.5.6   Functions of enumerated data types  */
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1843
/****************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1844
/****************************************************/  
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1845
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1846
/********************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1847
/***              Table 31                ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1848
/***  Functions of enumerated data types  ***/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1849
/********************************************/
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1850
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 314
diff changeset
  1851
/* Do we support this? */
739
Mario de Sousa <msousa@fe.up.pt>
parents: 700
diff changeset
  1852
905
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  1853
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  1854
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  1855
1067
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1856
/*************************************/
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1857
/*
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1858
  These defines are needed to have #if-like
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1859
  behaviour inside of macro. See macro
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1860
  ARITH_OPERATION_COND above.
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1861
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1862
  emacs commands to generate defines below.
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1863
  Select commands and eval-region
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1864
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1865
  (next-line)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1866
  (next-line)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1867
  (dotimes (i 200)
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1868
    (insert
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1869
     (format "\n#define ARITH_OPERATION_COND_%d_LE_8 %s" i (if (> i 8) "," "1"))))
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1870
*/
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1871
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1872
#define ARITH_OPERATION_COND_0_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1873
#define ARITH_OPERATION_COND_1_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1874
#define ARITH_OPERATION_COND_2_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1875
#define ARITH_OPERATION_COND_3_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1876
#define ARITH_OPERATION_COND_4_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1877
#define ARITH_OPERATION_COND_5_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1878
#define ARITH_OPERATION_COND_6_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1879
#define ARITH_OPERATION_COND_7_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1880
#define ARITH_OPERATION_COND_8_LE_8 1
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1881
#define ARITH_OPERATION_COND_9_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1882
#define ARITH_OPERATION_COND_10_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1883
#define ARITH_OPERATION_COND_11_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1884
#define ARITH_OPERATION_COND_12_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1885
#define ARITH_OPERATION_COND_13_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1886
#define ARITH_OPERATION_COND_14_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1887
#define ARITH_OPERATION_COND_15_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1888
#define ARITH_OPERATION_COND_16_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1889
#define ARITH_OPERATION_COND_17_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1890
#define ARITH_OPERATION_COND_18_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1891
#define ARITH_OPERATION_COND_19_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1892
#define ARITH_OPERATION_COND_20_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1893
#define ARITH_OPERATION_COND_21_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1894
#define ARITH_OPERATION_COND_22_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1895
#define ARITH_OPERATION_COND_23_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1896
#define ARITH_OPERATION_COND_24_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1897
#define ARITH_OPERATION_COND_25_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1898
#define ARITH_OPERATION_COND_26_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1899
#define ARITH_OPERATION_COND_27_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1900
#define ARITH_OPERATION_COND_28_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1901
#define ARITH_OPERATION_COND_29_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1902
#define ARITH_OPERATION_COND_30_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1903
#define ARITH_OPERATION_COND_31_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1904
#define ARITH_OPERATION_COND_32_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1905
#define ARITH_OPERATION_COND_33_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1906
#define ARITH_OPERATION_COND_34_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1907
#define ARITH_OPERATION_COND_35_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1908
#define ARITH_OPERATION_COND_36_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1909
#define ARITH_OPERATION_COND_37_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1910
#define ARITH_OPERATION_COND_38_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1911
#define ARITH_OPERATION_COND_39_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1912
#define ARITH_OPERATION_COND_40_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1913
#define ARITH_OPERATION_COND_41_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1914
#define ARITH_OPERATION_COND_42_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1915
#define ARITH_OPERATION_COND_43_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1916
#define ARITH_OPERATION_COND_44_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1917
#define ARITH_OPERATION_COND_45_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1918
#define ARITH_OPERATION_COND_46_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1919
#define ARITH_OPERATION_COND_47_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1920
#define ARITH_OPERATION_COND_48_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1921
#define ARITH_OPERATION_COND_49_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1922
#define ARITH_OPERATION_COND_50_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1923
#define ARITH_OPERATION_COND_51_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1924
#define ARITH_OPERATION_COND_52_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1925
#define ARITH_OPERATION_COND_53_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1926
#define ARITH_OPERATION_COND_54_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1927
#define ARITH_OPERATION_COND_55_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1928
#define ARITH_OPERATION_COND_56_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1929
#define ARITH_OPERATION_COND_57_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1930
#define ARITH_OPERATION_COND_58_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1931
#define ARITH_OPERATION_COND_59_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1932
#define ARITH_OPERATION_COND_60_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1933
#define ARITH_OPERATION_COND_61_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1934
#define ARITH_OPERATION_COND_62_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1935
#define ARITH_OPERATION_COND_63_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1936
#define ARITH_OPERATION_COND_64_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1937
#define ARITH_OPERATION_COND_65_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1938
#define ARITH_OPERATION_COND_66_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1939
#define ARITH_OPERATION_COND_67_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1940
#define ARITH_OPERATION_COND_68_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1941
#define ARITH_OPERATION_COND_69_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1942
#define ARITH_OPERATION_COND_70_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1943
#define ARITH_OPERATION_COND_71_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1944
#define ARITH_OPERATION_COND_72_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1945
#define ARITH_OPERATION_COND_73_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1946
#define ARITH_OPERATION_COND_74_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1947
#define ARITH_OPERATION_COND_75_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1948
#define ARITH_OPERATION_COND_76_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1949
#define ARITH_OPERATION_COND_77_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1950
#define ARITH_OPERATION_COND_78_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1951
#define ARITH_OPERATION_COND_79_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1952
#define ARITH_OPERATION_COND_80_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1953
#define ARITH_OPERATION_COND_81_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1954
#define ARITH_OPERATION_COND_82_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1955
#define ARITH_OPERATION_COND_83_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1956
#define ARITH_OPERATION_COND_84_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1957
#define ARITH_OPERATION_COND_85_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1958
#define ARITH_OPERATION_COND_86_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1959
#define ARITH_OPERATION_COND_87_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1960
#define ARITH_OPERATION_COND_88_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1961
#define ARITH_OPERATION_COND_89_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1962
#define ARITH_OPERATION_COND_90_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1963
#define ARITH_OPERATION_COND_91_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1964
#define ARITH_OPERATION_COND_92_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1965
#define ARITH_OPERATION_COND_93_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1966
#define ARITH_OPERATION_COND_94_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1967
#define ARITH_OPERATION_COND_95_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1968
#define ARITH_OPERATION_COND_96_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1969
#define ARITH_OPERATION_COND_97_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1970
#define ARITH_OPERATION_COND_98_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1971
#define ARITH_OPERATION_COND_99_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1972
#define ARITH_OPERATION_COND_100_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1973
#define ARITH_OPERATION_COND_101_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1974
#define ARITH_OPERATION_COND_102_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1975
#define ARITH_OPERATION_COND_103_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1976
#define ARITH_OPERATION_COND_104_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1977
#define ARITH_OPERATION_COND_105_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1978
#define ARITH_OPERATION_COND_106_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1979
#define ARITH_OPERATION_COND_107_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1980
#define ARITH_OPERATION_COND_108_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1981
#define ARITH_OPERATION_COND_109_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1982
#define ARITH_OPERATION_COND_110_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1983
#define ARITH_OPERATION_COND_111_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1984
#define ARITH_OPERATION_COND_112_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1985
#define ARITH_OPERATION_COND_113_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1986
#define ARITH_OPERATION_COND_114_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1987
#define ARITH_OPERATION_COND_115_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1988
#define ARITH_OPERATION_COND_116_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1989
#define ARITH_OPERATION_COND_117_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1990
#define ARITH_OPERATION_COND_118_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1991
#define ARITH_OPERATION_COND_119_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1992
#define ARITH_OPERATION_COND_120_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1993
#define ARITH_OPERATION_COND_121_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1994
#define ARITH_OPERATION_COND_122_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1995
#define ARITH_OPERATION_COND_123_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1996
#define ARITH_OPERATION_COND_124_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1997
#define ARITH_OPERATION_COND_125_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1998
#define ARITH_OPERATION_COND_126_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  1999
#define ARITH_OPERATION_COND_127_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2000
#define ARITH_OPERATION_COND_128_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2001
#define ARITH_OPERATION_COND_129_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2002
#define ARITH_OPERATION_COND_130_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2003
#define ARITH_OPERATION_COND_131_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2004
#define ARITH_OPERATION_COND_132_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2005
#define ARITH_OPERATION_COND_133_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2006
#define ARITH_OPERATION_COND_134_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2007
#define ARITH_OPERATION_COND_135_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2008
#define ARITH_OPERATION_COND_136_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2009
#define ARITH_OPERATION_COND_137_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2010
#define ARITH_OPERATION_COND_138_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2011
#define ARITH_OPERATION_COND_139_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2012
#define ARITH_OPERATION_COND_140_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2013
#define ARITH_OPERATION_COND_141_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2014
#define ARITH_OPERATION_COND_142_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2015
#define ARITH_OPERATION_COND_143_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2016
#define ARITH_OPERATION_COND_144_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2017
#define ARITH_OPERATION_COND_145_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2018
#define ARITH_OPERATION_COND_146_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2019
#define ARITH_OPERATION_COND_147_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2020
#define ARITH_OPERATION_COND_148_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2021
#define ARITH_OPERATION_COND_149_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2022
#define ARITH_OPERATION_COND_150_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2023
#define ARITH_OPERATION_COND_151_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2024
#define ARITH_OPERATION_COND_152_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2025
#define ARITH_OPERATION_COND_153_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2026
#define ARITH_OPERATION_COND_154_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2027
#define ARITH_OPERATION_COND_155_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2028
#define ARITH_OPERATION_COND_156_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2029
#define ARITH_OPERATION_COND_157_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2030
#define ARITH_OPERATION_COND_158_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2031
#define ARITH_OPERATION_COND_159_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2032
#define ARITH_OPERATION_COND_160_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2033
#define ARITH_OPERATION_COND_161_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2034
#define ARITH_OPERATION_COND_162_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2035
#define ARITH_OPERATION_COND_163_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2036
#define ARITH_OPERATION_COND_164_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2037
#define ARITH_OPERATION_COND_165_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2038
#define ARITH_OPERATION_COND_166_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2039
#define ARITH_OPERATION_COND_167_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2040
#define ARITH_OPERATION_COND_168_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2041
#define ARITH_OPERATION_COND_169_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2042
#define ARITH_OPERATION_COND_170_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2043
#define ARITH_OPERATION_COND_171_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2044
#define ARITH_OPERATION_COND_172_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2045
#define ARITH_OPERATION_COND_173_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2046
#define ARITH_OPERATION_COND_174_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2047
#define ARITH_OPERATION_COND_175_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2048
#define ARITH_OPERATION_COND_176_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2049
#define ARITH_OPERATION_COND_177_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2050
#define ARITH_OPERATION_COND_178_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2051
#define ARITH_OPERATION_COND_179_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2052
#define ARITH_OPERATION_COND_180_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2053
#define ARITH_OPERATION_COND_181_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2054
#define ARITH_OPERATION_COND_182_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2055
#define ARITH_OPERATION_COND_183_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2056
#define ARITH_OPERATION_COND_184_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2057
#define ARITH_OPERATION_COND_185_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2058
#define ARITH_OPERATION_COND_186_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2059
#define ARITH_OPERATION_COND_187_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2060
#define ARITH_OPERATION_COND_188_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2061
#define ARITH_OPERATION_COND_189_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2062
#define ARITH_OPERATION_COND_190_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2063
#define ARITH_OPERATION_COND_191_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2064
#define ARITH_OPERATION_COND_192_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2065
#define ARITH_OPERATION_COND_193_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2066
#define ARITH_OPERATION_COND_194_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2067
#define ARITH_OPERATION_COND_195_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2068
#define ARITH_OPERATION_COND_196_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2069
#define ARITH_OPERATION_COND_197_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2070
#define ARITH_OPERATION_COND_198_LE_8 ,
ce81fa6d9024 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1063
diff changeset
  2071
#define ARITH_OPERATION_COND_199_LE_8 ,
1069
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2072
#define ARITH_OPERATION_COND_200_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2073
#define ARITH_OPERATION_COND_201_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2074
#define ARITH_OPERATION_COND_202_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2075
#define ARITH_OPERATION_COND_203_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2076
#define ARITH_OPERATION_COND_204_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2077
#define ARITH_OPERATION_COND_205_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2078
#define ARITH_OPERATION_COND_206_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2079
#define ARITH_OPERATION_COND_207_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2080
#define ARITH_OPERATION_COND_208_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2081
#define ARITH_OPERATION_COND_209_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2082
#define ARITH_OPERATION_COND_210_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2083
#define ARITH_OPERATION_COND_211_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2084
#define ARITH_OPERATION_COND_212_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2085
#define ARITH_OPERATION_COND_213_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2086
#define ARITH_OPERATION_COND_214_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2087
#define ARITH_OPERATION_COND_215_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2088
#define ARITH_OPERATION_COND_216_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2089
#define ARITH_OPERATION_COND_217_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2090
#define ARITH_OPERATION_COND_218_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2091
#define ARITH_OPERATION_COND_219_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2092
#define ARITH_OPERATION_COND_220_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2093
#define ARITH_OPERATION_COND_221_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2094
#define ARITH_OPERATION_COND_222_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2095
#define ARITH_OPERATION_COND_223_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2096
#define ARITH_OPERATION_COND_224_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2097
#define ARITH_OPERATION_COND_225_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2098
#define ARITH_OPERATION_COND_226_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2099
#define ARITH_OPERATION_COND_227_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2100
#define ARITH_OPERATION_COND_228_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2101
#define ARITH_OPERATION_COND_229_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2102
#define ARITH_OPERATION_COND_230_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2103
#define ARITH_OPERATION_COND_231_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2104
#define ARITH_OPERATION_COND_232_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2105
#define ARITH_OPERATION_COND_233_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2106
#define ARITH_OPERATION_COND_234_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2107
#define ARITH_OPERATION_COND_235_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2108
#define ARITH_OPERATION_COND_236_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2109
#define ARITH_OPERATION_COND_237_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2110
#define ARITH_OPERATION_COND_238_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2111
#define ARITH_OPERATION_COND_239_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2112
#define ARITH_OPERATION_COND_240_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2113
#define ARITH_OPERATION_COND_241_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2114
#define ARITH_OPERATION_COND_242_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2115
#define ARITH_OPERATION_COND_243_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2116
#define ARITH_OPERATION_COND_244_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2117
#define ARITH_OPERATION_COND_245_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2118
#define ARITH_OPERATION_COND_246_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2119
#define ARITH_OPERATION_COND_247_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2120
#define ARITH_OPERATION_COND_248_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2121
#define ARITH_OPERATION_COND_249_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2122
#define ARITH_OPERATION_COND_250_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2123
#define ARITH_OPERATION_COND_251_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2124
#define ARITH_OPERATION_COND_252_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2125
#define ARITH_OPERATION_COND_253_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2126
#define ARITH_OPERATION_COND_254_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2127
#define ARITH_OPERATION_COND_255_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2128
#define ARITH_OPERATION_COND_256_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2129
#define ARITH_OPERATION_COND_257_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2130
#define ARITH_OPERATION_COND_258_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2131
#define ARITH_OPERATION_COND_259_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2132
#define ARITH_OPERATION_COND_260_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2133
#define ARITH_OPERATION_COND_261_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2134
#define ARITH_OPERATION_COND_262_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2135
#define ARITH_OPERATION_COND_263_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2136
#define ARITH_OPERATION_COND_264_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2137
#define ARITH_OPERATION_COND_265_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2138
#define ARITH_OPERATION_COND_266_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2139
#define ARITH_OPERATION_COND_267_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2140
#define ARITH_OPERATION_COND_268_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2141
#define ARITH_OPERATION_COND_269_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2142
#define ARITH_OPERATION_COND_270_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2143
#define ARITH_OPERATION_COND_271_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2144
#define ARITH_OPERATION_COND_272_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2145
#define ARITH_OPERATION_COND_273_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2146
#define ARITH_OPERATION_COND_274_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2147
#define ARITH_OPERATION_COND_275_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2148
#define ARITH_OPERATION_COND_276_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2149
#define ARITH_OPERATION_COND_277_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2150
#define ARITH_OPERATION_COND_278_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2151
#define ARITH_OPERATION_COND_279_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2152
#define ARITH_OPERATION_COND_280_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2153
#define ARITH_OPERATION_COND_281_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2154
#define ARITH_OPERATION_COND_282_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2155
#define ARITH_OPERATION_COND_283_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2156
#define ARITH_OPERATION_COND_284_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2157
#define ARITH_OPERATION_COND_285_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2158
#define ARITH_OPERATION_COND_286_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2159
#define ARITH_OPERATION_COND_287_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2160
#define ARITH_OPERATION_COND_288_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2161
#define ARITH_OPERATION_COND_289_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2162
#define ARITH_OPERATION_COND_290_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2163
#define ARITH_OPERATION_COND_291_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2164
#define ARITH_OPERATION_COND_292_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2165
#define ARITH_OPERATION_COND_293_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2166
#define ARITH_OPERATION_COND_294_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2167
#define ARITH_OPERATION_COND_295_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2168
#define ARITH_OPERATION_COND_296_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2169
#define ARITH_OPERATION_COND_297_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2170
#define ARITH_OPERATION_COND_298_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2171
#define ARITH_OPERATION_COND_299_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2172
#define ARITH_OPERATION_COND_300_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2173
#define ARITH_OPERATION_COND_301_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2174
#define ARITH_OPERATION_COND_302_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2175
#define ARITH_OPERATION_COND_303_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2176
#define ARITH_OPERATION_COND_304_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2177
#define ARITH_OPERATION_COND_305_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2178
#define ARITH_OPERATION_COND_306_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2179
#define ARITH_OPERATION_COND_307_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2180
#define ARITH_OPERATION_COND_308_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2181
#define ARITH_OPERATION_COND_309_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2182
#define ARITH_OPERATION_COND_310_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2183
#define ARITH_OPERATION_COND_311_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2184
#define ARITH_OPERATION_COND_312_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2185
#define ARITH_OPERATION_COND_313_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2186
#define ARITH_OPERATION_COND_314_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2187
#define ARITH_OPERATION_COND_315_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2188
#define ARITH_OPERATION_COND_316_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2189
#define ARITH_OPERATION_COND_317_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2190
#define ARITH_OPERATION_COND_318_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2191
#define ARITH_OPERATION_COND_319_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2192
#define ARITH_OPERATION_COND_320_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2193
#define ARITH_OPERATION_COND_321_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2194
#define ARITH_OPERATION_COND_322_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2195
#define ARITH_OPERATION_COND_323_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2196
#define ARITH_OPERATION_COND_324_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2197
#define ARITH_OPERATION_COND_325_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2198
#define ARITH_OPERATION_COND_326_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2199
#define ARITH_OPERATION_COND_327_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2200
#define ARITH_OPERATION_COND_328_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2201
#define ARITH_OPERATION_COND_329_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2202
#define ARITH_OPERATION_COND_330_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2203
#define ARITH_OPERATION_COND_331_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2204
#define ARITH_OPERATION_COND_332_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2205
#define ARITH_OPERATION_COND_333_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2206
#define ARITH_OPERATION_COND_334_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2207
#define ARITH_OPERATION_COND_335_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2208
#define ARITH_OPERATION_COND_336_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2209
#define ARITH_OPERATION_COND_337_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2210
#define ARITH_OPERATION_COND_338_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2211
#define ARITH_OPERATION_COND_339_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2212
#define ARITH_OPERATION_COND_340_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2213
#define ARITH_OPERATION_COND_341_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2214
#define ARITH_OPERATION_COND_342_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2215
#define ARITH_OPERATION_COND_343_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2216
#define ARITH_OPERATION_COND_344_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2217
#define ARITH_OPERATION_COND_345_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2218
#define ARITH_OPERATION_COND_346_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2219
#define ARITH_OPERATION_COND_347_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2220
#define ARITH_OPERATION_COND_348_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2221
#define ARITH_OPERATION_COND_349_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2222
#define ARITH_OPERATION_COND_350_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2223
#define ARITH_OPERATION_COND_351_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2224
#define ARITH_OPERATION_COND_352_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2225
#define ARITH_OPERATION_COND_353_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2226
#define ARITH_OPERATION_COND_354_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2227
#define ARITH_OPERATION_COND_355_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2228
#define ARITH_OPERATION_COND_356_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2229
#define ARITH_OPERATION_COND_357_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2230
#define ARITH_OPERATION_COND_358_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2231
#define ARITH_OPERATION_COND_359_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2232
#define ARITH_OPERATION_COND_360_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2233
#define ARITH_OPERATION_COND_361_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2234
#define ARITH_OPERATION_COND_362_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2235
#define ARITH_OPERATION_COND_363_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2236
#define ARITH_OPERATION_COND_364_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2237
#define ARITH_OPERATION_COND_365_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2238
#define ARITH_OPERATION_COND_366_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2239
#define ARITH_OPERATION_COND_367_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2240
#define ARITH_OPERATION_COND_368_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2241
#define ARITH_OPERATION_COND_369_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2242
#define ARITH_OPERATION_COND_370_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2243
#define ARITH_OPERATION_COND_371_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2244
#define ARITH_OPERATION_COND_372_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2245
#define ARITH_OPERATION_COND_373_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2246
#define ARITH_OPERATION_COND_374_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2247
#define ARITH_OPERATION_COND_375_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2248
#define ARITH_OPERATION_COND_376_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2249
#define ARITH_OPERATION_COND_377_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2250
#define ARITH_OPERATION_COND_378_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2251
#define ARITH_OPERATION_COND_379_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2252
#define ARITH_OPERATION_COND_380_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2253
#define ARITH_OPERATION_COND_381_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2254
#define ARITH_OPERATION_COND_382_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2255
#define ARITH_OPERATION_COND_383_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2256
#define ARITH_OPERATION_COND_384_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2257
#define ARITH_OPERATION_COND_385_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2258
#define ARITH_OPERATION_COND_386_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2259
#define ARITH_OPERATION_COND_387_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2260
#define ARITH_OPERATION_COND_388_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2261
#define ARITH_OPERATION_COND_389_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2262
#define ARITH_OPERATION_COND_390_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2263
#define ARITH_OPERATION_COND_391_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2264
#define ARITH_OPERATION_COND_392_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2265
#define ARITH_OPERATION_COND_393_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2266
#define ARITH_OPERATION_COND_394_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2267
#define ARITH_OPERATION_COND_395_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2268
#define ARITH_OPERATION_COND_396_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2269
#define ARITH_OPERATION_COND_397_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2270
#define ARITH_OPERATION_COND_398_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2271
#define ARITH_OPERATION_COND_399_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2272
#define ARITH_OPERATION_COND_400_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2273
#define ARITH_OPERATION_COND_401_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2274
#define ARITH_OPERATION_COND_402_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2275
#define ARITH_OPERATION_COND_403_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2276
#define ARITH_OPERATION_COND_404_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2277
#define ARITH_OPERATION_COND_405_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2278
#define ARITH_OPERATION_COND_406_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2279
#define ARITH_OPERATION_COND_407_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2280
#define ARITH_OPERATION_COND_408_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2281
#define ARITH_OPERATION_COND_409_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2282
#define ARITH_OPERATION_COND_410_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2283
#define ARITH_OPERATION_COND_411_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2284
#define ARITH_OPERATION_COND_412_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2285
#define ARITH_OPERATION_COND_413_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2286
#define ARITH_OPERATION_COND_414_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2287
#define ARITH_OPERATION_COND_415_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2288
#define ARITH_OPERATION_COND_416_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2289
#define ARITH_OPERATION_COND_417_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2290
#define ARITH_OPERATION_COND_418_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2291
#define ARITH_OPERATION_COND_419_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2292
#define ARITH_OPERATION_COND_420_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2293
#define ARITH_OPERATION_COND_421_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2294
#define ARITH_OPERATION_COND_422_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2295
#define ARITH_OPERATION_COND_423_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2296
#define ARITH_OPERATION_COND_424_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2297
#define ARITH_OPERATION_COND_425_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2298
#define ARITH_OPERATION_COND_426_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2299
#define ARITH_OPERATION_COND_427_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2300
#define ARITH_OPERATION_COND_428_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2301
#define ARITH_OPERATION_COND_429_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2302
#define ARITH_OPERATION_COND_430_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2303
#define ARITH_OPERATION_COND_431_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2304
#define ARITH_OPERATION_COND_432_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2305
#define ARITH_OPERATION_COND_433_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2306
#define ARITH_OPERATION_COND_434_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2307
#define ARITH_OPERATION_COND_435_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2308
#define ARITH_OPERATION_COND_436_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2309
#define ARITH_OPERATION_COND_437_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2310
#define ARITH_OPERATION_COND_438_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2311
#define ARITH_OPERATION_COND_439_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2312
#define ARITH_OPERATION_COND_440_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2313
#define ARITH_OPERATION_COND_441_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2314
#define ARITH_OPERATION_COND_442_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2315
#define ARITH_OPERATION_COND_443_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2316
#define ARITH_OPERATION_COND_444_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2317
#define ARITH_OPERATION_COND_445_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2318
#define ARITH_OPERATION_COND_446_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2319
#define ARITH_OPERATION_COND_447_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2320
#define ARITH_OPERATION_COND_448_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2321
#define ARITH_OPERATION_COND_449_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2322
#define ARITH_OPERATION_COND_450_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2323
#define ARITH_OPERATION_COND_451_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2324
#define ARITH_OPERATION_COND_452_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2325
#define ARITH_OPERATION_COND_453_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2326
#define ARITH_OPERATION_COND_454_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2327
#define ARITH_OPERATION_COND_455_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2328
#define ARITH_OPERATION_COND_456_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2329
#define ARITH_OPERATION_COND_457_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2330
#define ARITH_OPERATION_COND_458_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2331
#define ARITH_OPERATION_COND_459_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2332
#define ARITH_OPERATION_COND_460_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2333
#define ARITH_OPERATION_COND_461_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2334
#define ARITH_OPERATION_COND_462_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2335
#define ARITH_OPERATION_COND_463_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2336
#define ARITH_OPERATION_COND_464_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2337
#define ARITH_OPERATION_COND_465_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2338
#define ARITH_OPERATION_COND_466_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2339
#define ARITH_OPERATION_COND_467_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2340
#define ARITH_OPERATION_COND_468_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2341
#define ARITH_OPERATION_COND_469_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2342
#define ARITH_OPERATION_COND_470_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2343
#define ARITH_OPERATION_COND_471_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2344
#define ARITH_OPERATION_COND_472_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2345
#define ARITH_OPERATION_COND_473_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2346
#define ARITH_OPERATION_COND_474_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2347
#define ARITH_OPERATION_COND_475_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2348
#define ARITH_OPERATION_COND_476_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2349
#define ARITH_OPERATION_COND_477_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2350
#define ARITH_OPERATION_COND_478_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2351
#define ARITH_OPERATION_COND_479_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2352
#define ARITH_OPERATION_COND_480_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2353
#define ARITH_OPERATION_COND_481_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2354
#define ARITH_OPERATION_COND_482_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2355
#define ARITH_OPERATION_COND_483_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2356
#define ARITH_OPERATION_COND_484_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2357
#define ARITH_OPERATION_COND_485_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2358
#define ARITH_OPERATION_COND_486_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2359
#define ARITH_OPERATION_COND_487_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2360
#define ARITH_OPERATION_COND_488_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2361
#define ARITH_OPERATION_COND_489_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2362
#define ARITH_OPERATION_COND_490_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2363
#define ARITH_OPERATION_COND_491_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2364
#define ARITH_OPERATION_COND_492_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2365
#define ARITH_OPERATION_COND_493_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2366
#define ARITH_OPERATION_COND_494_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2367
#define ARITH_OPERATION_COND_495_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2368
#define ARITH_OPERATION_COND_496_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2369
#define ARITH_OPERATION_COND_497_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2370
#define ARITH_OPERATION_COND_498_LE_8 ,
0b275a2c7c2b improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
Mario de Sousa <msousa@fe.up.pt>
parents: 1068
diff changeset
  2371
#define ARITH_OPERATION_COND_499_LE_8 ,
905
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  2372
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  2373
31224f8cac32 Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
mjsousa
parents: 904
diff changeset
  2374
#endif /* _IEC_STD_FUNCTIONS_H */