Skip to content

Commit 04ce66d

Browse files
committed
Fix get_size for long double
1 parent 54f9007 commit 04ce66d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gcc/jit/jit-recording.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -2671,19 +2671,19 @@ recording::memento_of_get_type::get_size ()
26712671
break;
26722672
case GCC_JIT_TYPE_FLOAT:
26732673
m = targetm.c.mode_for_floating_type (TI_FLOAT_TYPE);
2674-
size = GET_MODE_PRECISION (m).to_constant ();
2674+
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
26752675
break;
26762676
#ifdef HAVE_BFmode
26772677
case GCC_JIT_TYPE_BFLOAT16:
26782678
return GET_MODE_UNIT_SIZE (BFmode);
26792679
#endif
26802680
case GCC_JIT_TYPE_DOUBLE:
26812681
m = targetm.c.mode_for_floating_type (TI_DOUBLE_TYPE);
2682-
size = GET_MODE_PRECISION (m).to_constant ();
2682+
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
26832683
break;
26842684
case GCC_JIT_TYPE_LONG_DOUBLE:
26852685
m = targetm.c.mode_for_floating_type (TI_LONG_DOUBLE_TYPE);
2686-
size = GET_MODE_PRECISION (m).to_constant ();
2686+
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
26872687
break;
26882688
case GCC_JIT_TYPE_FLOAT16:
26892689
size = 16;

0 commit comments

Comments
 (0)