Skip to content

Commit f4c15a0

Browse files
committed
stress-fp-subnormal: use DBL consts when long double size is same as double
32 bit systems such as armel and armhf may have long doubles the same size as doubles, so check for the matching size and use DBL constants in these cases. Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent ec437b2 commit f4c15a0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

stress-fp-subnormal.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,19 @@ static int stress_fp(stress_args_t *args)
427427
stress_fp_subnormal_metrics[i].count = 0.0;
428428
}
429429

430+
#if DBL_MIN_EXP == LDBL_MIN_EXP
431+
fp_data->ld.tiny1 = DBL_TINY1;
432+
fp_data->ld.tiny2 = DBL_TINY2;
433+
fp_data->ld.oneish = DBL_ONEISH;
434+
fp_data->ld.r[0] = DBL_TINY1;
435+
fp_data->ld.r[1] = DBL_TINY1;
436+
#else
430437
fp_data->ld.tiny1 = LDBL_TINY1;
431438
fp_data->ld.tiny2 = LDBL_TINY2;
432439
fp_data->ld.oneish = LDBL_ONEISH;
433440
fp_data->ld.r[0] = LDBL_TINY1;
434441
fp_data->ld.r[1] = LDBL_TINY1;
442+
#endif
435443

436444
fp_data->d.tiny1 = DBL_TINY1;
437445
fp_data->d.tiny2 = DBL_TINY2;

0 commit comments

Comments
 (0)