@@ -52,7 +52,7 @@ typedef struct
52
52
* @return rounded high to uint64_t
53
53
*/
54
54
static uint64_t
55
- ecma_round_high_to_uint64 (ecma_uint128_t * num_p )
55
+ ecma_round_high_to_uint64 (ecma_uint128_t * num_p ) /**< 128-bit unsigned integer */
56
56
{
57
57
uint64_t masked_lo = num_p -> lo & ~(1ULL << 63u );
58
58
uint64_t masked_hi = num_p -> hi & 0x1 ;
@@ -69,7 +69,8 @@ ecma_round_high_to_uint64 (ecma_uint128_t *num_p)
69
69
* Left shift 128-bit integer by max 63 bits.
70
70
*/
71
71
static void JERRY_ATTR_ALWAYS_INLINE
72
- ecma_uint128_shift_left (ecma_uint128_t * num_p , int32_t shift )
72
+ ecma_uint128_shift_left (ecma_uint128_t * num_p , /**< 128-bit unsigned integer */
73
+ int32_t shift ) /**< left shift count */
73
74
{
74
75
num_p -> hi = (num_p -> hi << shift ) | (num_p -> lo >> (64 - shift ));
75
76
num_p -> lo <<= shift ;
@@ -79,7 +80,8 @@ ecma_uint128_shift_left (ecma_uint128_t *num_p, int32_t shift)
79
80
* Right shift 128-bit integer by max 63 bits.
80
81
*/
81
82
static void JERRY_ATTR_ALWAYS_INLINE
82
- ecma_uint128_shift_right (ecma_uint128_t * num_p , int32_t shift )
83
+ ecma_uint128_shift_right (ecma_uint128_t * num_p , /**< 128-bit unsigned integer */
84
+ int32_t shift ) /**< right shift count */
83
85
{
84
86
num_p -> lo = (num_p -> lo >> shift ) | (num_p -> hi << (64 - shift ));
85
87
num_p -> hi >>= shift ;
@@ -89,7 +91,8 @@ ecma_uint128_shift_right (ecma_uint128_t *num_p, int32_t shift)
89
91
* Add two 128-bit integer values and assign the result to the left one.
90
92
*/
91
93
static void
92
- ecma_uint128_add (ecma_uint128_t * left_p , ecma_uint128_t * right_p )
94
+ ecma_uint128_add (ecma_uint128_t * left_p , /**< left 128-bit unsigned integer */
95
+ ecma_uint128_t * right_p ) /**< right 128-bit unsigned integer */
93
96
{
94
97
left_p -> hi += right_p -> hi ;
95
98
left_p -> lo += right_p -> lo ;
@@ -104,7 +107,7 @@ ecma_uint128_add (ecma_uint128_t *left_p, ecma_uint128_t *right_p)
104
107
* Multiply 128-bit integer by 10
105
108
*/
106
109
static void
107
- ecma_uint128_mul10 (ecma_uint128_t * num_p )
110
+ ecma_uint128_mul10 (ecma_uint128_t * num_p ) /**< 128-bit unsigned integer */
108
111
{
109
112
ecma_uint128_shift_left (num_p , 1u );
110
113
@@ -130,7 +133,7 @@ ecma_uint128_mul10 (ecma_uint128_t *num_p)
130
133
* Q = Q3 *2^96 + Q2 *2^64 + Q1 *2^32 + Q0 *2^0 // 128-bit quotient
131
134
*/
132
135
static void
133
- ecma_uint128_div10 (ecma_uint128_t * num_p )
136
+ ecma_uint128_div10 (ecma_uint128_t * num_p ) /**< 128-bit unsigned integer */
134
137
{
135
138
/* estimation of reciprocal of 10, 128 bits right of the binary point (T1 == T2) */
136
139
const uint64_t tenth_l = 0x9999999aul ;
0 commit comments