Public interfaces of picotm's arithmetic module. More...
Macros | |
| #define | __PICOTM_ARITHMETIC_STATIC_ASSERT_TWOCPL(__type, __min, __max) |
| #define | __PICOTM_ARITHMETIC_STATIC_ASSERT_UNSIGNED(__type, __min) |
| #define | PICOTM_ARITHMETIC_ADD_F_TX(__name, __type, __ext, __idt, __add, __sub) |
| #define | PICOTM_ARITHMETIC_ADD_S_TX(__name, __type, __min, __max, __idt, __add, __sub) |
| #define | PICOTM_ARITHMETIC_ADD_U_TX(__name, __type, __min, __max, __idt, __add, __sub) |
| #define | PICOTM_ARITHMETIC_DIV_F_TX(__name, __type, __ext, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_DIV_S_TX(__name, __type, __min, __max, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_DIV_U_TX(__name, __type, __min, __max, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_MUL_F_TX(__name, __type, __ext, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_MUL_S_TX(__name, __type, __min, __max, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_MUL_U_TX(__name, __type, __min, __max, __idt, __asb, __mul, __div) |
| #define | PICOTM_ARITHMETIC_SUB_F_TX(__name, __type, __ext, __idt, __add, __sub) |
| #define | PICOTM_ARITHMETIC_SUB_S_TX(__name, __type, __min, __max, __idt, __add, __sub) |
| #define | PICOTM_ARITHMETIC_SUB_U_TX(__name, __type, __min, __max, __idt, __add, __sub) |
Functions | |
| PICOTM_NOTHROW void | __picotm_arithmetic_error_divbyzero_tx (void) |
| PICOTM_NOTHROW void | __picotm_arithmetic_error_overflow_tx (void) |
| PICOTM_NOTHROW void | __picotm_arithmetic_error_underflow_tx (void) |
| #define __PICOTM_ARITHMETIC_STATIC_ASSERT_TWOCPL | ( | __type, | |
| __min, | |||
| __max | |||
| ) |
Tests if a signed type uses two's complement.
| #define __PICOTM_ARITHMETIC_STATIC_ASSERT_UNSIGNED | ( | __type, | |
| __min | |||
| ) |
Tests if a type is unsigned.
| #define PICOTM_ARITHMETIC_ADD_F_TX | ( | __name, | |
| __type, | |||
| __ext, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that adds two values of the floating-point C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __ext | The type's extension. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| #define PICOTM_ARITHMETIC_ADD_S_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that adds two values of the signed C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The minimum value of the type. |
| __max | The maximum value of the type. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| #define PICOTM_ARITHMETIC_ADD_U_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that adds two values of the unsigned C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The minimum value of the type. |
| __max | The maximum value of the type. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| #define PICOTM_ARITHMETIC_DIV_F_TX | ( | __name, | |
| __type, | |||
| __ext, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that divides a values of the floatng-point C type __type by a value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __ext | The type's extension. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_DIV_S_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that divides a values of the signed C type __type by a value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The type's minimum value. |
| __max | The type's maximum value. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_DIV_U_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that divides a values of the unsigned C type __type by a value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The type's minimum value. |
| __max | The type's maximum value. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_MUL_F_TX | ( | __name, | |
| __type, | |||
| __ext, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that multiplies two values of the floating-point C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __ext | The type's extension. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_MUL_S_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that multiplies two values of the signed C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The type's minimum value. |
| __max | The type's maximum value. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_MUL_U_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __asb, | |||
| __mul, | |||
| __div | |||
| ) |
Defines a C function that multiplies two values of the unsigned C type __type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The type's minimum value. |
| __max | The type's maximum value. |
| __idt | The type's identity element (i.e., one). |
| __asb | The type's absorbing element (i.e., zero). |
| __mul | The multiply operation. Should be && for _Bool and * for everything else. |
| __div | The divide operation. Divisions shall always round towards zero. |
| #define PICOTM_ARITHMETIC_SUB_F_TX | ( | __name, | |
| __type, | |||
| __ext, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that subtracts one value of the floating-point C type __type from another value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __ext | The type's extension. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| #define PICOTM_ARITHMETIC_SUB_S_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that subtracts one value of the signed C type __type from another value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The minimum value of the type. |
| __max | The maximum value of the type. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| #define PICOTM_ARITHMETIC_SUB_U_TX | ( | __name, | |
| __type, | |||
| __min, | |||
| __max, | |||
| __idt, | |||
| __add, | |||
| __sub | |||
| ) |
Defines a C function that subtracts one value of the unsigned C type __type from another value of the same type.
| __name | The name of the value's type. |
| __type | The C type of the value. |
| __min | The minimum value of the type. |
| __max | The maximum value of the type. |
| __idt | The identity element (i.e., zero) of the type. |
| __add | The add operation. |
| __sub | The subtract operation. |
| PICOTM_NOTHROW void __picotm_arithmetic_error_divbyzero_tx | ( | void | ) |
Reports a division-by-zero error to the transaction manager.
| PICOTM_NOTHROW void __picotm_arithmetic_error_overflow_tx | ( | void | ) |
Reports an overflow error to the transaction manager.
| PICOTM_NOTHROW void __picotm_arithmetic_error_underflow_tx | ( | void | ) |
Reports an underflow error to the transaction manager.