A bug in the file read logic has also been fixed along the way. Parts
of the ungetc tests will fail without that bug fixed.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D137286
The new framework makes it explicit which processor feature is being
used and allows for easier per platform customization:
- ARM cpu now uses trivial implementations to reduce code size.
- Memcmp, Bcmp and Memmove have been optimized for x86
- Bcmp has been optimized for aarch64.
This is a reland of https://reviews.llvm.org/D135134 (b3f1d58, 0284148813)
Reviewed By: courbet
Differential Revision: https://reviews.llvm.org/D136595
This patch extracts the testing logic from `op_tests.cpp` into
`memory_check_utils.h` so we can reuse it for mem* function integration
tests.
This makes testing consistent and thorough.
For instance this catches a bug that got unnoticed during submission of
D136595 and D135134. Integration test for memcmp was only testing a
single size.
This also leverages ASAN to make sure that data is not read / written
outside permitted boundaries
Differential Revision: https://reviews.llvm.org/D136865
The strcoll function is intended to compare strings based on their
ordering in the current locale. Since the locale facilities have not yet
been added, a simple implementation that is the same as strcmp has been
added as a placeholder.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136802
This is the first piece of scanf. It's very similar in design to printf,
and so much of the code is copied from that. There were potential issues
with conflicting macros so I've also renamed the "ASSERT_FORMAT_EQ"
macro for printf to "ASSERT_PFORMAT_EQ".
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136288
This patch adds the flip, set_range, and operator== functions to bitset.
These will be used in scanf.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136881
Adding `EXPECT_MPFR_MATCH_ROUNDING_SILENTLY` macro that does not call
`explainError` when the tests fail. This is useful to check the passing or
failing rates, such as hitting percentages of fast passes in math
implementations.
Reviewed By: michaelrj, sivachandra
Differential Revision: https://reviews.llvm.org/D136731
When a number for strtofloat has an exponent that's too big or small, it
doesn't need to be calculated precisely since it is guaranteed to be
either INF or 0.0. This tightens those cutoffs to improve performance.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136699
The new framework makes it explicit which processor feature is being
used and allows for easier per platform customization:
- ARM cpu now uses trivial implementations to reduce code size.
- Memcmp, Bcmp and Memmove have been optimized for x86
- Bcmp has been optimized for aarch64.
This is a reland of https://reviews.llvm.org/D135134 (b3f1d58)
Differential Revision: https://reviews.llvm.org/D136595
The difftime function computes the difference between two calendar
times: time1 - time0 as per as per 7.27.2.2 section in
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2478.pdf.
double difftime(time_t time1, time_t time0);
Tested:
Unit tests
Co-authored-by: Jeff Bailey <jeffbailey@google.com>
Reviewed By: jeffbailey
Differential Revision: https://reviews.llvm.org/D136631
This allows the client to set compile flags to disable the passes that
the string to float function uses. A client may be willing to trade off
performance for a reduction in code size, and this allows for that
fine-tuning.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136495
This version is more composable and also simpler at the expense of being more explicit and more verbose.
This patch provides rationale for the framework, implementation and unit tests but the functions themselves are still using the previous version. The change in implementation will come in a follow up patch.
Differential Revision: https://reviews.llvm.org/D136292
The name of the libc target changed, this patch updates the cmake for
the string to float comparison test to use the correct name.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D136388
This version is more composable and also simpler at the expense of being more explicit and more verbose.
This patch provides rationale for the framework, implementation and unit tests but the functions themselves are still using the previous version. The change in implementation will come in a follow up patch.
Differential Revision: https://reviews.llvm.org/D136292