Skip to content

Commit 1b485c0

Browse files
committed
[libc] Special case PPC double double handling for printf
Summary: Hard code this to a uint128 so it can be built on PPC.
1 parent 208257f commit 1b485c0

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)