Skip to content

Commit cc6def4

Browse files
authored
[libc] Special case PPC double double for print (#136614)
Summary: We use the storage class for `long double` in the printing implementations. We don't fully support the PPC double double type, which that maps to, but we can stub out just the support needed for the print interface to works. This required using the internal interface for storage type, but it should be good enough. Fixes: #136596
1 parent 9651902 commit cc6def4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libc/src/stdio/printf_core/core_structs.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ struct FormatSection {
5555
int min_width = 0;
5656
int precision = -1;
5757

58-
// Needs to be large enough to hold a long double.
58+
// Needs to be large enough to hold a long double. Special case handling for
59+
// the PowerPC double double type because it has no FPBits interface.
60+
#ifdef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
61+
Uint128 conv_val_raw;
62+
#else
5963
fputil::FPBits<long double>::StorageType conv_val_raw;
64+
#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
6065
void *conv_val_ptr;
6166

6267
char conv_name;

0 commit comments

Comments
 (0)