feat: replace custom format with std::format#66
Open
FurryAcetylCoA wants to merge 8 commits intoOpenXiangShan:masterfrom
Open
feat: replace custom format with std::format#66FurryAcetylCoA wants to merge 8 commits intoOpenXiangShan:masterfrom
FurryAcetylCoA wants to merge 8 commits intoOpenXiangShan:masterfrom
Conversation
for std::format
Before moving to std::format, it would be better to check the current usage of format
In 65c41e0, jaypiper use a bitop optimize trick to make conditional update into logical operation (hint: cond is Bool and -(uint8_t)1 is 0xFF) However, jaypiper forgot to remove the last argument of the format thus leading to a stray format
haven't figureout why uintptr_t is chosen. but i think ull is big enough. It might be too big, leaving that to the TODO
The GNU C++ lib is too old on bookworm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the custom formatting implementation with
std::formatAs dzwduan recommended in #57However
fmt::printfrequire additional build-time requirement, so I choosestd::formatinsteadThis has zero impact on gsim performance.
However std::format require C++20 headers and libraries which current(2025.4.19) debian stable(bookworm) can't compile out-of-box (require install
clang++-19andlibc++-19-devmanually)If maintaining compatibility with plain Debian stable is a priority for the project, this PR might not be advisable to merge, as it would complicate the build environment requirements