[libc][nfc] move printf inf/nan to separate functionThe floating point functions all use the same inf and nan formatting. Byseparating this functionality out of the %a conversion I make itavailab
[libc][nfc] move printf inf/nan to separate functionThe floating point functions all use the same inf and nan formatting. Byseparating this functionality out of the %a conversion I make itavailable for reuse by %f/e/g.Reviewed By: lntue, sivachandraDifferential Revision: https://reviews.llvm.org/D129665
show more ...
[libc] Add a convenience class and function for integer to string conversion.Printf's integer converter has been modified to use the new converter. Infuture, it will be used to implement other par
[libc] Add a convenience class and function for integer to string conversion.Printf's integer converter has been modified to use the new converter. Infuture, it will be used to implement other parts of the libc.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D130227
[libc] add rounding modes to printf float convThis adds functionality for rounding towards negative inf, positive inf,and zero to the float hex conversion (%a).Reviewed By: lntueDifferential R
[libc] add rounding modes to printf float convThis adds functionality for rounding towards negative inf, positive inf,and zero to the float hex conversion (%a).Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D129702
[libc] clean up printf error codesMove the constants for printf's return values into core_structs, andupdate the converters to match.Reviewed By: lntueDifferential Revision: https://reviews.ll
[libc] clean up printf error codesMove the constants for printf's return values into core_structs, andupdate the converters to match.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D128767
[libc] add printf hexadecimal float conversionThis patch adds the %a/A conversions to printf, as well as the compilerflag to disable floating point handling entirely. This will allow ourprintf im
[libc] add printf hexadecimal float conversionThis patch adds the %a/A conversions to printf, as well as the compilerflag to disable floating point handling entirely. This will allow ourprintf implementation to display every type of argument allowed byprintf, although some formats are still incomplete.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D129240
[libc] add integer writing to printfThis patch adds %n to printf, as well as a compiler flag to disable it.This is due to it having serious security issues when misused.Reviewed By: lntueDiffe
[libc] add integer writing to printfThis patch adds %n to printf, as well as a compiler flag to disable it.This is due to it having serious security issues when misused.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D127517
[libc] add printf oct conversionThe oct converter handles the %o conversion.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D127985
[libc] add printf pointer convThe pointer converter handles the %p conversion. It uses the hexconverter for most of the conversion.Reviewed By: sivachandraDifferential Revision: https://review
[libc] add printf pointer convThe pointer converter handles the %p conversion. It uses the hexconverter for most of the conversion.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D127995
[libc][obvious] fix sign warning in file_writerIn the sign writer, a size_t was being compared to an int. This patchcasts the size_t to an int so that the comparison doesn't cause a signcompariso
[libc][obvious] fix sign warning in file_writerIn the sign writer, a size_t was being compared to an int. This patchcasts the size_t to an int so that the comparison doesn't cause a signcomparison warning.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D127984
[libc] add printf hex conversionThe hex converter handles the %x and %X conversions.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D126082
[libc] refactor printf file writingAdd return values to converter functions to allow for better errorhandling when writing files. Also move the file writing code around tobe easier to read.Revi
[libc] refactor printf file writingAdd return values to converter functions to allow for better errorhandling when writing files. Also move the file writing code around tobe easier to read.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D127773
[libc] move printf_main in to object libraryPreviously printf_main was a header library, but header librarydependencies don't work properly so it's been moved to an objectlibrary. Additionally, t
[libc] move printf_main in to object libraryPreviously printf_main was a header library, but header librarydependencies don't work properly so it's been moved to an objectlibrary. Additionally, the writers have been marked inline.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D126830
[libc] add printf base 10 integer conversionThis patch adds support for d, i, and u conversions in printf, as wellas comprehensive unit tests.Reviewed By: sivachandraDifferential Revision: htt
[libc] add printf base 10 integer conversionThis patch adds support for d, i, and u conversions in printf, as wellas comprehensive unit tests.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D125929
[libc] add fprintf and file_writerThis patch adds the file_writer header, which just provides a wrapperfor File->write, as well as fprintf to use it. There are no unit testsfor file_writer since
[libc] add fprintf and file_writerThis patch adds the file_writer header, which just provides a wrapperfor File->write, as well as fprintf to use it. There are no unit testsfor file_writer since it's too simple to need them, but fprintf doeshave a simple test of writing to a file.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D125939
[libc] add sprintfThis adds the sprintf entrypoint, as well as unit tests. Currentlysprintf only supports %%, %s, and %c, but the other conversions are onthe way.Reviewed By: sivachandra, lntue
[libc] add sprintfThis adds the sprintf entrypoint, as well as unit tests. Currentlysprintf only supports %%, %s, and %c, but the other conversions are onthe way.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D125573
[libc] add printf converterThis adds the main pieces of the last piece of printf, the converter.This takes the completed format section from the parser and thenconverts it to a string for the wri
[libc] add printf converterThis adds the main pieces of the last piece of printf, the converter.This takes the completed format section from the parser and thenconverts it to a string for the writer, which is why it was the lastpiece to be written. So far it supports chars and strings, but morepieces are coming. Additionally, it supports replacing all of theconversion functions with user supplied versions at compile time toallow for additional functionality.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D125327
[libc][NFC] add index mode to printf parserThis patch is a followup to the previous patch which implemented themain printf parsing logic as well as sequential mode. This patch addsindex mode.Re
[libc][NFC] add index mode to printf parserThis patch is a followup to the previous patch which implemented themain printf parsing logic as well as sequential mode. This patch addsindex mode.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D123424
[libc] add printf writerThe printf implmentation is made up of three main pieces, the parser,the converter, and the writer. This patch adds the implementation forthe writer, as well as the functi
[libc] add printf writerThe printf implmentation is made up of three main pieces, the parser,the converter, and the writer. This patch adds the implementation forthe writer, as well as the function for writing to a string, along withtests.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D124421
[libc] Add Printf FormatSection MatcherThis patch changes the printf parser tests to use a more robust matcher.This allows for better debugging of parsing issues. This does not affectthe actual p
[libc] Add Printf FormatSection MatcherThis patch changes the printf parser tests to use a more robust matcher.This allows for better debugging of parsing issues. This does not affectthe actual printf code at all, only the tests.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D124130
[libc][NFC] implement printf parserThis patch adds the sequential mode implementation of the printf parser,as well as unit tests for it. In addition it adjusts the surroundingfiles to accomodate
[libc][NFC] implement printf parserThis patch adds the sequential mode implementation of the printf parser,as well as unit tests for it. In addition it adjusts the surroundingfiles to accomodate changes in the design found in the implementationprocess.Reviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D123339