Skip to content

Commit

Permalink
wip: try disable optimization on ecma_number_remainder
Browse files Browse the repository at this point in the history
JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
  • Loading branch information
matetokodi committed May 16, 2024
1 parent 0638dc4 commit 6e434e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jerry-core/ecma/base/ecma-helpers-number.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ ecma_number_trunc (ecma_number_t num) /**< ecma-number */
*
* @return number - calculated remainder.
*/
#pragma GCC push_options
#pragma GCC optimize ("O0")
ecma_number_t JERRY_ATTR_CONST
ecma_number_remainder (ecma_number_t left_num, /**< left operand */
ecma_number_t right_num) /**< right operand */
Expand All @@ -370,13 +372,14 @@ ecma_number_remainder (ecma_number_t left_num, /**< left operand */

if (ecma_number_is_zero (r) && ecma_number_is_negative (left_num))
{
printf ("\nnumber is 0 and left num is negative\n");
printf ("r: %fd\n", r);
return -r;
// printf ("\nnumber is 0 and left num is negative\n");
// printf ("r: %fd\n", r);
r = -r;
// printf ("r negated: %fd\n", r);
}
return r;
} /* ecma_number_remainder */
#pragma GCC pop_options

/**
* Compute power operation according to the ES standard.
Expand Down

0 comments on commit 6e434e5

Please sign in to comment.